Skip to content

Commit 764bc1a

Browse files
Security: Also fix eval() in concore_oport.m
1 parent ec4e9f0 commit 764bc1a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

concore_oport.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
if isequal(s(i:i+length(target)-1),target)
88
for j = i+length(target):length(s)
99
if isequal(s(j),',')||isequal(s(j),'}')
10-
result = eval(s(i+length(target):j-1));
10+
% Safe numeric parsing (replaces unsafe eval)
11+
port_str = strtrim(s(i+length(target):j-1));
12+
result = sscanf(port_str, '%f');
1113
return
1214
end
1315
end

0 commit comments

Comments
 (0)