DaveGamble / cJSON

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

Parsing of ASCII control characters #871

Open j-moeller opened 4 months ago

j-moeller commented 4 months ago

Hello,

we found some unexpected behaviour and issues in cJSON when dealing with ASCII control characters (besides the documented behaviour when dealing with '\0’ or "\u0000") and wanted to inform you about our findings:

In [1] we found that cJSON accepts control character, although according to the JSON specification, control characters should not be part of a valid JSON string. In [2], we found control characters influencing the representation of a string.