unicode-rs / unicode-segmentation

Grapheme Cluster and Word boundaries according to UAX#29 rules
https://unicode-rs.github.io/unicode-segmentation
Other
571 stars 56 forks source link

Fix arithmetic overflow panics #138

Closed cardigan1008 closed 3 months ago

cardigan1008 commented 3 months ago

Fix 6 arithmetic overflow panics in #119

Wrap operations with safer functions to deal with edge cases.

Manishearth commented 3 months ago

Thanks!!