rust-cli / anstyle

ANSI text styling
https://docs.rs/anstyle
Other
120 stars 19 forks source link

Fixes unsoundness issue #156. #157

Closed burakemir closed 9 months ago

burakemir commented 9 months ago

Here is a tentative fix for the unsoundness issue #156.

In short: we accept not only UTF8 continuation bytes as printable in is_printable_str, but also bytes that mark beginnings of multi-byte sequences where the state change table let us down and failed to produce Utf8Begin.

epage commented 9 months ago

Thanks for working on this fix!

burakemir commented 9 months ago

Thanks for the quick fix.