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

Out of index error found by afl.rs #656

Closed
StevenJiang1110 opened this issue Dec 4, 2020 · 2 comments
Closed

Out of index error found by afl.rs #656

StevenJiang1110 opened this issue Dec 4, 2020 · 2 comments

Comments

@StevenJiang1110
Copy link

I run afl.rs on url2.2.0 with the patch mentioned in #655 ,and I found new out of index error(The error should have nothing about the patch, for it can be replayed on version2.2.0 without patch). The code to replay the error is

let mut _local0 = url::Url::parse("m://").unwrap();
let mut _local1 = url::Url::path_segments_mut(&mut _local0).unwrap();
let _ = url::PathSegmentsMut::pop_if_empty(&mut _local1);

or

let mut _local0 = url::Url::parse("o://").unwrap();
let mut _local1 = url::Url::path_segments_mut(&mut _local0).unwrap();
let _ = url::PathSegmentsMut::pop(&mut _local1);

(I guess this two is about the same error)
I put the replay files and more inputs that may cause crash on
first
second
It seems the url with empty content after "//" or url with some specific unicode characters may lead to the panic.
I hope you will check if this is a real bug. Thanks a lot.

@StevenJiang1110
Copy link
Author

The total bug report with RUST_BACKTRACE=full is like this
截屏2020-12-04 下午3 01 37

valenting added a commit that referenced this issue Dec 8, 2020
url: fix panic on popping from Url without path (fixes #656)
@djc
Copy link
Contributor

djc commented Dec 8, 2020

Thanks for the report, keep 'em coming if there's anything more!

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