engine: fix buffer overflow in COM_ParseFile
This commit is contained in:
parent
0ce8d92f27
commit
e308281b0b
1 changed files with 11 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue