This repository has been archived by the owner on Dec 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 109
arithmetic overflow when parsing str → Json #109
Comments
Here's the code I used: extern crate rustc_serialize;
use rustc_serialize::json::Json;
use std::io::{self, Read, Cursor};
fn main() {
let mut input = String::new();
let result = io::stdin().read_to_string(&mut input);
if result.is_ok() {
let data = Json::from_str(&input);
}
} And the log/backtrace:
|
Seem to be the -0 that is not handled correctly, had the same problem with the following json: Panic message was: |
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
Attempting to parse:
Results in:
This bug was found using https://github.com/kmcallister/afl.rs 👍
The text was updated successfully, but these errors were encountered: