mity / md4c

C Markdown parser. Fast. SAX-like interface. Compliant to CommonMark specification.
MIT License
756 stars 138 forks source link

[oss-fuzz 43471] Input triggering assertion #173

Closed mity closed 2 years ago

mity commented 2 years ago

(Distilled from https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43471)

Oss-fuzz found a testcase leading to assertion. After some manual tinkering, it can be triggered from command line easily with this:

$ echo "[[![$| ftp://.. $]()]]" | md2html --fpermissive-url-autolinks --fwiki-links --flatex-math

(Requires debug build. In release build anything can happen...)

mity commented 2 years ago

db9ab417b11eaf96722b6cfb22f8ead5e22513c9 is incorrect/insufficent fix.