mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-04 18:06:22 +03:00
0023335: Array overrun is possible. The value of 'i' index could reach 200 in Interface_MSG.cxx
Iterating from 1 to 199 over the 'buf' in order to avoid an overrun.
This commit is contained in:
parent
b28f4666f9
commit
db3d2a99ae
@ -142,7 +142,7 @@ Standard_Integer Interface_MSG::Read (Standard_IStream& S)
|
||||
if (buf[0] == '\0') continue;
|
||||
if (buf[0] == '@') {
|
||||
nb ++;
|
||||
for (i = 1; i <= 200; i ++) {
|
||||
for (i = 1; i <= 199; i ++) {
|
||||
key[i-1] = buf[i];
|
||||
if (buf[i] == '\0') break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user