-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assertion In Pow10.h
is triggered in Document::Parse
#313
Comments
This is a bug. It is very important because it reads out-of-bound memory. I have done a quick fix in 93d13ad. During the fix, I also find that some numbers with different form will generate a parse error:
I have also push a commit to solve this second problem. Besides, I also notify that there will be still some artifical cases with incorrect |
Hi miloyip, thanks for responding so quickly. |
My bad... I forgot exp is signed integer. The new 7708215 should be conservative. |
Thanks again, I think this time it is really fixed. I should mention that this bug was initially triggered by a fuzzer called "american fuzzy lop", which is written by a google staff: http://lcamtuf.coredump.cx/afl/ |
Fix #313 Assertion In `Pow10.h` is triggered in Document::Parse
RAPIDJSON::INTERNAL::FASTPATH An assertion was hit in rapidjson when parsing a JSON text that contained a floating point number with a large, negative exponent. The bug is fixed upstream in this bug report: Tencent/rapidjson#313 This patch applies the upstream fix to extra/rapidjson/include/rapidjson/reader.h. (cherry picked from commit 9392c553a046a6feb053dbd62649e33db8b41c2b)
RAPIDJSON::INTERNAL::FASTPATH An assertion was hit in rapidjson when parsing a JSON text that contained a floating point number with a large, negative exponent. The bug is fixed upstream in this bug report: Tencent/rapidjson#313 This patch applies the upstream fix to extra/rapidjson/include/rapidjson/reader.h.
RAPIDJSON::INTERNAL::FASTPATH An assertion was hit in rapidjson when parsing a JSON text that contained a floating point number with a large, negative exponent. The bug is fixed upstream in this bug report: Tencent/rapidjson#313 This patch applies the upstream fix to extra/rapidjson/include/rapidjson/reader.h.
RAPIDJSON::INTERNAL::FASTPATH An assertion was hit in rapidjson when parsing a JSON text that contained a floating point number with a large, negative exponent. The bug is fixed upstream in this bug report: Tencent/rapidjson#313 This patch applies the upstream fix to extra/rapidjson/include/rapidjson/reader.h. (cherry picked from commit 9392c553a046a6feb053dbd62649e33db8b41c2b)
here is the code that triggered the assertion
output:
This happened because integer overflowed while parsing the exponent.
In rapidjson/include/rapidjson/reader.h:926
The text was updated successfully, but these errors were encountered: