Browse Source

engine: fix buffer overflow in COM_ParseFile

pull/2/head
Alibek Omarov 5 years ago
parent
commit
e308281b0b
  1. 13
      engine/common/common.c

13
engine/common/common.c

@ -510,8 +510,17 @@ skipwhite:
data++; data++;
while( 1 ) while( 1 )
{ {
c = (byte)*data++; c = (byte)*data;
if( c == '\"' || !c )
// unexpected line end
if( !c )
{
token[len] = 0;
return data;
}
data++;
if( c == '\"' )
{ {
token[len] = 0; token[len] = 0;
return data; return data;

Loading…
Cancel
Save