Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3ef4e4e

Browse files
sbvoxelAlanscut
authored andcommitted
Fix heap buffer overflow
Fixes DaveGamble#800
1 parent 826cd6f commit 3ef4e4e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎cJSON.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,6 +1660,11 @@ static cJSON_bool parse_object(cJSON * const item, parse_buffer * const input_bu
16601660
current_item = new_item;
16611661
}
16621662

1663+
if (cannot_access_at_index(input_buffer, 1))
1664+
{
1665+
goto fail; /* nothing comes after the comma */
1666+
}
1667+
16631668
/* parse the name of the child */
16641669
input_buffer->offset++;
16651670
buffer_skip_whitespace(input_buffer);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /