dtolnay / syn

Parser for Rust source code
Apache License 2.0
2.89k stars 310 forks source link

parsing panics with "Unrecognized literal" #893

Closed sameer closed 4 years ago

sameer commented 4 years ago

Hello,

I'm doing some fuzzing with AFL and ran into the following input that causes syn to panic during parsing:

fn a() {
  9E9999E999  mod aimp;
}

Resulting in:

thread 'main' panicked at 'Unrecognized literal: `9E9999E999`', /home/purisame/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.39/src/lit.rs:960:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Let me know if there is any other information I can provide, or if it would be helpful if I PR'd a fix for it!

dtolnay commented 4 years ago

Thanks, fixed in 1.0.40.