mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
Add missing length check
This commit is contained in:
parent
b45f48e600
commit
8601838022
5
cJSON.c
5
cJSON.c
@ -778,6 +778,11 @@ static cJSON_bool parse_string(cJSON * const item, parse_buffer * const input_bu
|
|||||||
unsigned char *output = NULL;
|
unsigned char *output = NULL;
|
||||||
|
|
||||||
/* not a string */
|
/* not a string */
|
||||||
|
if (!can_access_at_index(input_buffer, 0))
|
||||||
|
{
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
if (buffer_at_offset(input_buffer)[0] != '\"')
|
if (buffer_at_offset(input_buffer)[0] != '\"')
|
||||||
{
|
{
|
||||||
goto fail;
|
goto fail;
|
||||||
|
Loading…
Reference in New Issue
Block a user