Fix some invalid write errors.

This commit is contained in:
Jordan Bancino 2023-01-09 15:18:59 +00:00
parent 80ff232af9
commit 9358264add

View file

@ -905,7 +905,7 @@ JsonDecodeValue(JsonParserState * state)
value = JsonValueArray(JsonDecodeArray(state)); value = JsonValueArray(JsonDecodeArray(state));
break; break;
case TOKEN_STRING: case TOKEN_STRING:
strValue = Malloc(state->tokenLen); strValue = Malloc(state->tokenLen + 1);
if (!strValue) if (!strValue)
{ {
return NULL; return NULL;