google / filament

Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
https://google.github.io/filament/
Apache License 2.0
17.44k stars 1.84k forks source link

attempt to detect buffer overflows in Texture::setImage() #7689

Closed pixelflinger closed 4 months ago

pixelflinger commented 4 months ago

We verify that the buffer given to setImage() is at least as large as needed for the given region to transfer; at least based on the size given.

This might help catch b/330407429.

poweifeng commented 4 months ago

We verify that the buffer given to setImage() is at least as large as needed for the given region to transfer; at least based on the size given.

This might help catch b/330407429.

You might want to add in the commit message BUGS=330407429 so that it'll post to the bug (but not close it).