-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for ILBM #36
Conversation
Thanks for the PR, I'll try to review when I have time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have a few things that might need to be looked at.
Thank you very much for addressing the changes! I'll do another pass when I can and probably get this merged soon. After it's merged I'll still be waiting on the other open PRs to get resolved, but this will be out in 0.13.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ran a quick fuzzer pass and the following input crashes:
46 4F 52 4D 30 30 30 30 49 4C 42 4D 73 31 73 3D FF FF FF FF
Issue seems to be adding with overflow (4294967295 + 1).
There is similar code in the JXL parser you can use as reference:
let box_end = box_start
.checked_add(box_size)
.ok_or(ImageError::CorruptedImage)?;
I will be away for a while, but will run another fuzzer pass after this is resolved.
A chunk with length u32::MAX caused an overflow when adding the padding byte to determine the number of bytes to skip. I’ve fixed it to cast to u64 before the addition rather than after. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good to me!
This PR adds support for the ILBM (Interleaved Bitmap) format, also known as IFF (which is the container format used by ILBM). ILBM was the main image format used on the Amiga, and is still supported as a save format by Photoshop to this day.