stratum: null ptr check on json arrays

This commit is contained in:
Tanguy Pruvot 2018-01-10 15:54:09 +01:00
parent 9a0aedfacd
commit d200935198

View file

@ -503,7 +503,7 @@ json_value * json_parse_ex (json_settings * settings,
case ']': case ']':
if (top->type == json_array) if (top && top->type == json_array)
flags = (flags & ~ (flag_need_comma | flag_seek_value)) | flag_next; flags = (flags & ~ (flag_need_comma | flag_seek_value)) | flag_next;
else else
{ sprintf (error, "%d:%d: Unexpected ]", cur_line, e_off); { sprintf (error, "%d:%d: Unexpected ]", cur_line, e_off);