Skip to content

Commit

Permalink
Fix parsing bug when object's name is illegal
Browse files Browse the repository at this point in the history
  • Loading branch information
Barenboim committed Jan 3, 2023
1 parent fc599bf commit 2b2b689
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion json_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ static int __parse_json_members(const char *cursor, const char **end,
cursor++;
ret = __json_string_length(cursor);
if (ret < 0)
break;
return ret;

memb = (json_member_t *)malloc(offsetof(json_member_t, name) + ret + 1);
if (!memb)
Expand Down

0 comments on commit 2b2b689

Please sign in to comment.