mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
402de2985d
When using the BMP encoding, ICO images are expected to contain a 1-bit mask for transparency. Regardless an alpha channel is already included in the image, the mask is always required. As stated here[1], the mask is used to provide shadow around the image. Unfortunately, it seems that some encoder do not include that second transparency mask. So let's read that mask only if some data is still remaining after decoding the image. The test case has been generated by truncating the 64 last bytes (originally dedicated to the mask) from the `serenity.ico` file and changing the declared size of the image in the ICO header. The size value is stored at the offset 0x0E in the file and I changed the value from 0x0468 to 0x0428. [1]: https://devblogs.microsoft.com/oldnewthing/20101021-00/?p=12483 |
||
---|---|---|
.. | ||
malformed_maskless.ico | ||
oss-fuzz-testcase-62541.ico | ||
oss-fuzz-testcase-63177.ico | ||
oss-fuzz-testcase-63357.ico | ||
serenity.ico |