Skip to content

test: link title with bare > and newline panics subtokenize#211

Open
ChristianMurphy wants to merge 1 commit intowooorm:mainfrom
ChristianMurphy:test/link-title-with-bare-gt-and-newline
Open

test: link title with bare > and newline panics subtokenize#211
ChristianMurphy wants to merge 1 commit intowooorm:mainfrom
ChristianMurphy:test/link-title-with-bare-gt-and-newline

Conversation

@ChristianMurphy
Copy link
Copy Markdown
Collaborator

to_html_with_options("[x](/x \"> \n\")", &Options::default()) panics in 1.0.0 release at src/subtokenize.rs:149 with expected link. The 13-byte input is a link with quoted title containing > followed by a newline; the parser's link-chain consumer reaches an event whose link field is None (added by attention.rs without a Link payload) and unconditionally expects it.

Same panic site as GH-79 ([](a (a \n))) but distinct input shape. A single chain-builder integrity fix in src/construct/label_end.rs (or wherever the chain is spliced) likely closes both shapes together.

Verified to fail against markdown = "=1.0.0" in release. Found via in-tree fuzzing campaign.

Related-to: GH-79.

`to_html_with_options("[x](/x \"> \n\")", &Options::default())` panics
in 1.0.0 release at `src/subtokenize.rs:149` with `expected link`. The
13-byte input is a link with quoted title containing `> ` followed by a
newline; the parser's link-chain consumer reaches an event whose `link`
field is `None` (added by attention.rs without a `Link` payload) and
unconditionally `expect`s it.

Same panic site as wooormGH-79 (`[](a (a \n))`) but distinct input shape.
A single chain-builder integrity fix in `src/construct/label_end.rs`
(or wherever the chain is spliced) likely closes both shapes together.

Verified to fail against `markdown = "=1.0.0"` in release. Found via
in-tree fuzzing campaign.

Related-to: wooormGH-79.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant