DaveGamble / cJSON

Ultralightweight JSON parser in ANSI C
MIT License
10.83k stars 3.22k forks source link

fix positive value with '+' prefix crash in parse_value() #785

Closed hyh19962008 closed 2 months ago

hyh19962008 commented 1 year ago

without this fix, the program will crash with the following test: assert_parse_value("+1.5", cJSON_Number);

darkuranium commented 2 months ago

Note that + is not a valid number prefix according to the JSON spec, so this PR would make it non-compliant: JSON image grammar

hyh19962008 commented 2 months ago

Got it, closing this PR.