ladybird/Tests/LibGfx/test-inputs/ico
Lucas CHOLLET 402de2985d LibGfx/ICO: Do not try to decode a mask if we already reached EOF
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
2024-01-07 12:32:02 -05:00
..
malformed_maskless.ico LibGfx/ICO: Do not try to decode a mask if we already reached EOF 2024-01-07 12:32:02 -05:00
oss-fuzz-testcase-62541.ico Tests: Add regression tests for fixed OSS-Fuzz test cases 2023-10-24 07:30:04 +02:00
oss-fuzz-testcase-63177.ico Tests: Add regression tests for fixed OSS-Fuzz test cases 2023-10-24 07:30:04 +02:00
oss-fuzz-testcase-63357.ico LibGfx/BMPLoader: Mitigate potential overflows when decoding bitmap DIB 2023-10-25 05:52:29 +02:00
serenity.ico Tests/LibGfx: Move the ICO test file to the ico directory 2024-01-07 12:32:02 -05:00