Fix #155822: Out of bounds buffer read when writing AVIF image format

Saving AVIF was reading past the buffer bounds for 8bit images,
workaround the bug by re-allocating a buffer with the necessary
padding to avoid the error.

This has been fixed up-stream, the workaround can eventually be removed
when we drop support for older OIIO versions.

Ref !155824
This commit is contained in:
Campbell Barton 2026-03-19 22:50:14 +00:00
parent 731f0a115a
commit 3aeba8cc09
2 changed files with 60 additions and 7 deletions

View file

@ -767,9 +767,6 @@ class TestImBufFileTypes(unittest.TestCase):
size = (32, 32)
with tempfile.TemporaryDirectory() as tempdir:
for type_id, file_type in imbuf.file_types.items():
# Skip until #155822 is fixed.
if type_id == 'AVIF':
continue
if type_id in read_only_types:
continue
ext = file_type.file_extensions[0]