typst / ecow

Compact, clone-on-write vector and string.
Apache License 2.0
208 stars 16 forks source link

Defensively test against mistakes found in the advisory db #19

Closed CosmicHorrorDev closed 1 year ago

CosmicHorrorDev commented 1 year ago

I figured it would be worthwhile to start digging through issues reported in the advisory-db. So far it hasn't found anything interesting, but this includes areas that could have issues from future optimizations (primarily avoiding extra bounds/capacity checking)

This is just the first set since there's more I would like to add (namely around panicking in either clone() or drop(), but that seems fine so far). Common sources of issues seem to be

Still have more auditing to do, but so far things seem very solid :+1:

codecov[bot] commented 1 year ago

Codecov Report

Base: 86.68% // Head: 86.68% // No change to project coverage :thumbsup:

Coverage data is based on head (d8c31a9) compared to base (ebcbaa1). Patch has no changes to coverable lines.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #19 +/- ## ======================================= Coverage 86.68% 86.68% ======================================= Files 5 5 Lines 1359 1359 ======================================= Hits 1178 1178 Misses 181 181 ``` Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=typst). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=typst)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

laurmaedje commented 1 year ago

Nice!