COM_Parse: Fix buffer overflow in long quoted strings.

This commit is contained in:
svdijk 2012-11-17 14:59:38 +01:00 committed by Yamagi Burmeister
parent 561add00a8
commit 1dd083cd7d

View file

@ -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;