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

Loading…
Cancel
Save