mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 20:51:31 +00:00
COM_Parse: Fix buffer overflow in long quoted strings.
This commit is contained in:
parent
561add00a8
commit
1dd083cd7d
1 changed files with 2 additions and 3 deletions
|
@ -987,9 +987,7 @@ skipwhite:
|
|||
|
||||
if ((c == '\"') || !c)
|
||||
{
|
||||
com_token[len] = 0;
|
||||
*data_p = data;
|
||||
return com_token;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (len < MAX_TOKEN_CHARS)
|
||||
|
@ -1014,6 +1012,7 @@ skipwhite:
|
|||
}
|
||||
while (c > 32);
|
||||
|
||||
done:
|
||||
if (len == MAX_TOKEN_CHARS)
|
||||
{
|
||||
len = 0;
|
||||
|
|
Loading…
Reference in a new issue