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
I tried running the existing parse fuzzer, and found this crash:
thread '<unnamed>' panicked at 'index out of bounds: the len is 14 but the index is 14', /home/mg/src/pulldown-cmark/src/firstpass.rs:1424:13
stack backtrace:
0: rust_begin_unwind
at /rustc/6bba061467f7c2cab04b262b95eb67bf89265587/library/std/src/panicking.rs:593:5
1: core::panicking::panic_fmt
at /rustc/6bba061467f7c2cab04b262b95eb67bf89265587/library/core/src/panicking.rs:67:14
2: core::panicking::panic_bounds_check
at /rustc/6bba061467f7c2cab04b262b95eb67bf89265587/library/core/src/panicking.rs:162:5
3: core::option::Option<T>::map_or
4: pulldown_cmark::firstpass::scan_paragraph_interrupt
5: pulldown_cmark::firstpass::FirstPass::parse_paragraph
6: pulldown_cmark::firstpass::FirstPass::parse_block
7: pulldown_cmark::firstpass::FirstPass::run
8: pulldown_cmark::firstpass::run_first_pass
9: pulldown_cmark::parse::Parser::new_ext
Activity
mgeisler commentedon Jun 17, 2023
(I'm not able to assign labels to the issues I create, I think I need to be a collaborator on the repository for that.)
raphlinus commentedon Jun 17, 2023
You should be invited now.
mgeisler commentedon Jun 17, 2023
The following simple patch might be enough — tests are passing before/after I apply it:
mgeisler commentedon Jun 17, 2023
Oh, nice! Thanks 😄
mgeisler commentedon Jun 17, 2023
It seems like this line was introduced in #654. @notriddle, does my patch above look good to you? The fuzzer seem stable after I apply it.
Fix index out of bounds when parsing GFM footnote
mgeisler commentedon Jun 17, 2023
Let's discuss on #667.