mity / md4c

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

Defensively fix 3 asserts that didn't hold and prevent endless loop in md_rollback #182

Closed TCKnet closed 1 year ago

TCKnet commented 1 year ago

These were discovered through fuzzying

codecov[bot] commented 1 year ago

Codecov Report

Merging #182 (2ac0b9d) into master (e9ff661) will decrease coverage by 0.08%. The diff coverage is 70.00%.

:exclamation: Current head 2ac0b9d differs from pull request most recent head dbb7889. Consider uploading reports for the commit dbb7889 to get more accurate results

@@            Coverage Diff             @@
##           master     #182      +/-   ##
==========================================
- Coverage   94.32%   94.23%   -0.09%     
==========================================
  Files           3        3              
  Lines        3100     3105       +5     
==========================================
+ Hits         2924     2926       +2     
- Misses        176      179       +3     
Impacted Files Coverage Δ
src/md4c.c 94.13% <70.00%> (-0.10%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

TCKnet commented 1 year ago

Test cases: testcases.zip