github / cmark-gfm

GitHub's fork of cmark, a CommonMark parsing and rendering library and program in C
Other
875 stars 171 forks source link

Revert bad fix for GHSA-66g8-4hjf-77xh #323

Closed kevinbackhouse closed 1 year ago

kevinbackhouse commented 1 year ago

Revert and the previous fix for https://github.com/github/cmark-gfm/security/advisories/GHSA-66g8-4hjf-77xh. That solution was complicated and fragile, and it turns out that it couldn't handle examples like this:

python3 -c 'n = 40000; print(" -" * n + " > ```" + "\n" * n)' | ./src/cmark-gfm

I'll post a follow-up PR with the original, much simpler solution.