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++;
|
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…
Add table
Reference in a new issue