-
-
Notifications
You must be signed in to change notification settings - Fork 368
Open
Description
The fuzzer on 0840723 found this case which doesn't round-trip.
fn main() {
let u = url::Url::parse("p:/.//:/").unwrap();
let s = u.as_str();
assert_eq!(s, "p://:/"); // the `/.` was lost
url::Url::parse("p://:/").unwrap(); // which causes this to error
}Also, the fuzzer can be simplified to not need the UTF-8 check by doing
fuzz_target!(|data: &str| {
if let Ok(parsed) = url::Url::parse(data) {
let as_str = parsed.as_str();
assert_eq!(parsed, url::Url::parse(as_str).unwrap());
}
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels