mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-11 06:32:10 +08:00
engine: fix buffer overflow in COM_ParseFile
This commit is contained in:
+11
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user