Skip to content

Out of index error found by afl.rs #656

Closed
@StevenJiang1110

Description

@StevenJiang1110

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions