You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Windows 11, Rust 1.76.0 latest stable and MSVC.
When trying to parse an Avif file that has a bit depth other than 8, this assertion is triggered.
C:\Users\user.cargo\registry\src\index.crates.io-6f17d22bba15001f\image-0.24.8\src\codecs\avif\decoder.rs:59:9:
assertion left == right failed
left: 10
right: 8
Also, I don't think there should be an assertion at all as I think a denial of service can happen by a malicious Avif file (that sets the bit depth to an unsupported amount)?
Expected
File decodes normally
Actual behaviour
panics from assertion
Reproduction steps
let bytes = // open the Avif image in bytes
image::load_from_memory(bytes).unwrap();
The text was updated successfully, but these errors were encountered:
Yeah, at the moment we don't support 10 or 12 bit AVIF images. Agreed that this should be an "Unsupported" error rather than an assert until support is added though
I'm using Windows 11, Rust 1.76.0 latest stable and MSVC.
When trying to parse an Avif file that has a bit depth other than 8, this assertion is triggered.
C:\Users\user.cargo\registry\src\index.crates.io-6f17d22bba15001f\image-0.24.8\src\codecs\avif\decoder.rs:59:9:
assertion
left == right
failedleft: 10
right: 8
I used these images to test
8 bit depth: https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile1.8bpc.yuv444.avif
10 bit depth: https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile1.10bpc.yuv444.avif
It seems Avif supports 8, 10, and 12 bit depths.
https://aomediacodec.github.io/av1-avif/v1.1.0.html#biblio-av1:~:text=NOTE%3A%20%5BAV1%5D%20supports%203%20bit%20depths%3A%208%2C%2010%20and%2012%20bits
Also, I don't think there should be an assertion at all as I think a denial of service can happen by a malicious Avif file (that sets the bit depth to an unsupported amount)?
Expected
File decodes normally
Actual behaviour
panics from assertion
Reproduction steps
let bytes = // open the Avif image in bytes
image::load_from_memory(bytes).unwrap();
The text was updated successfully, but these errors were encountered: