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 on `attempt to subtract with overflow` #1

Closed
neosilky opened this issue Sep 11, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@neosilky
Copy link

commented Sep 11, 2017

Using cargo-fuzz, I found the following bug:

'attempt to subtract with overflow', src/radius_attr.rs:43:28

The line in question subtracts 2 from l but this can be < 2.

I would submit a patch wrapping the line with cond! but the program interface may have to change. As a result, I'll leave it to the developer.

@chifflier chifflier closed this in 6b527da Sep 11, 2017

@chifflier

This comment has been minimized.

Copy link
Member

commented Sep 11, 2017

Good catch, thanks.
I used verify! to avoid changing the API, and raise a parse error if length is < 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.