You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found by a fuzzer. I didn't see duplicates in the issue tracker. Feel free to close if this isn't helpful / a priority!
// Cargo.toml: pulldown-cmark = "0.13.4"use pulldown_cmark::{Options,Parser};fnmain(){// "%\n:\u{301}\n\t:" == b"%\n:\xcc\x81\n\t:" (8 bytes)// % definition-list title// :U+0301 a definition whose text is a 2-byte combining acute// \t: a second definition, introduced by a TABlet doc = "%\n:\u{301}\n\t:";let opts = Options::ENABLE_DEFINITION_LIST;for(_event, range)inParser::new_ext(doc, opts).into_offset_iter(){// Start/End(DefinitionListDefinition) report 4..8; byte 4 is inside U+0301.// panics: start byte index 4 is not a char boundarylet _src:&str = &doc[range];}}
thread 'main' (382438) panicked at src/main.rs:14:30:
start byte index 4 is not a char boundary; it is inside '\u{301}' (bytes 3..5 of string)
Activity