mirror of
https://github.com/openharmony/third_party_cJSON.git
synced 2026-07-20 21:59:36 -04:00
Description: 调用parse_string增加offset判断
IssueNo:https://gitee.com/openharmony/third_party_cJSON/issues/I9OUF5 Binary Source:No Signed-off-by: liubo419 <liubo419@huawei.com>
This commit is contained in:
@@ -1659,6 +1659,11 @@ static cJSON_bool parse_object(cJSON * const item, parse_buffer * const input_bu
|
||||
current_item = new_item;
|
||||
}
|
||||
|
||||
if (cannot_access_at_index(input_buffer, 1))
|
||||
{
|
||||
goto fail; /* nothing comes after the comma */
|
||||
}
|
||||
|
||||
/* parse the name of the child */
|
||||
input_buffer->offset++;
|
||||
buffer_skip_whitespace(input_buffer);
|
||||
|
||||
Reference in New Issue
Block a user