mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +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)
|
if ((c == '\"') || !c)
|
||||||
{
|
{
|
||||||
com_token[len] = 0;
|
goto done;
|
||||||
*data_p = data;
|
|
||||||
return com_token;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (len < MAX_TOKEN_CHARS)
|
if (len < MAX_TOKEN_CHARS)
|
||||||
|
@ -1014,6 +1012,7 @@ skipwhite:
|
||||||
}
|
}
|
||||||
while (c > 32);
|
while (c > 32);
|
||||||
|
|
||||||
|
done:
|
||||||
if (len == MAX_TOKEN_CHARS)
|
if (len == MAX_TOKEN_CHARS)
|
||||||
{
|
{
|
||||||
len = 0;
|
len = 0;
|
||||||
|
|
Loading…
Reference in a new issue