font-rs icon indicating copy to clipboard operation
font-rs copied to clipboard

Potential wrapping add

Open mooman219 opened this issue 6 years ago • 0 comments

https://github.com/raphlinus/font-rs/blob/ad0b79ea9b76cc80687ad4363d4fa692fbd0ddf8/src/raster.rs#L82

x0i can be -1 in this case, and casting it to usize will give usize max. The addition with linestart will cause an arithmetic overflow. Wrapping add should be used.

mooman219 avatar Sep 10 '19 09:09 mooman219