mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
tex-3d-size-limit.html currently crashes because we don't check that the input data is large enough, and happily access memory that's not ours if it's not. The referenced ticket comes from the fact that we don't systematically detect a crash (which makes sense if we're (un)lucky), and this patch eradicates the crash altogether by checking the input buffer size. The size computation is a (partial) port of WPT's computeImageSizes3D JS function. Fixes: https://github.com/servo/servo/issues/42881 Testing: Some expected failures in wpt/webgl can be removed, including a crash. Signed-off-by: Simon Martin <simon@nasilyan.com>