Skip to content

[fuzz result] thread 'main' panicked: slice index starts at 8 but ends at 5 #921

@sigaloid

Description

@sigaloid
use pulldown_cmark::Options;

fn main() {
    let string = "- [x]\t\t\n\\\n-";

    let mut opts = pulldown_cmark::Options::empty();

    opts.insert(Options::ENABLE_TASKLISTS);
    opts.insert(Options::ENABLE_HEADING_ATTRIBUTES);

    for _ in pulldown_cmark::Parser::new_ext(string, opts) {}
}
thread 'main' panicked at pulldown-cmark-0.11.0/src/firstpass.rs:1965:49:
slice index starts at 8 but ends at 5

// extract the trailing attribute block
let header_bytes = &self.text.as_bytes()[header_start..header_end];

Btw, this is a label:fuzzer_finding, but cannot add this myself :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions