Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
json: avoid buffer overread in Json::parse_primitive
It looks like this code as copy-and-pasted from similar code above it that checks s+1==end. That code actually uses s[1] and knows s[0], so it's correct. This code is not correct and the effect is that it will overread when parsing a number with a single-digit exponent at the end of a buffer. It also allows malformed numbers with an exponent that has a valid second digit but invalid first digit to parse. Found by @bannable.
- Loading branch information