Skip to content
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

panic at Unrecognized literal #897

Closed
alexanderkjall opened this issue Sep 25, 2020 · 1 comment
Closed

panic at Unrecognized literal #897

alexanderkjall opened this issue Sep 25, 2020 · 1 comment

Comments

@alexanderkjall
Copy link

Hi, I'm going over all the dependencies in my dependency-tree with a fuzzer, and found this panic in syn:

thread 'main' panicked at 'Unrecognized literal: 6E--5458', /home/capitol/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.41/src/lit.rs:955:13

It can be reproduced with this program:

use syn::Expr;

fn main() {
    let s = "6E--5458";
    let _ = syn::parse_str::<Expr>(s);
}

I would have expected it to return an Error instead.

@dtolnay
Copy link
Owner

dtolnay commented Sep 26, 2020

Thank you! I've published syn 1.0.42 with a fix. This issue involved some bugs in proc-macro2 as well so you'll need to update both.

@dtolnay dtolnay closed this as completed Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants