esnme / ujson4c

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BUG: parsed string length not correctly considered

bpintea opened this issue · comments

The library does not correctly consider the length when parsing the input string. If the string is not a NTS, the library will read past the indicated limit.

If the library is passed a correctly formatted JSON and the character next to the indicated end is a non-white space character, the parsing will succeed. But:

  • if the JSON is incorrect, the parsing can crash;
  • if the end+1 character is a white string, the parsing will incorrectly fail (for a correct JSON string).