cemyuksel / cyCodeBase

An open source programming resource intended for graphics programmers.
MIT License
271 stars 60 forks source link

AlphaPyramid out of bounds access for textures with large aspect ratios #14

Closed dominikwodniok closed 2 years ago

dominikwodniok commented 3 years ago

https://github.com/cemyuksel/cyCodeBase/blob/fb063c3532fb7000a6a32c578e6c7285310979d9/cyAlphaDistribution.h#L488

Out of bounds accesses can occur in setImgAlpha for ix and a when the input image e.g. has a resolution of 11x1. In this case no pyramid is created and ix as well as a in setImgAlpha are too small.

cemyuksel commented 2 years ago

I finally made time to fix it. Thanks for letting me know.