Closed qarmin closed 1 month ago
Thank you for the bug report, especially for the sample file. I'll have a look soon.
Do I have your permission to include and publish this image file publicly in the repository for future test runs?
No(this file is probably taken from github from one project) and due random nature of this bug, I cannot reproduce problem with other files
understood.
In case you are looking for a workaround, you can try these options:
unfortunately, if you are using the exr crate indirectly through the image
crate, these options won't be accessible currently.
I have good and bad news.
Good: I was able to always reproduce the problem with your file, each time when reading it. However, also none of the photo editing software I have could open it (affinity photo, krita). It seems the one file you provided is not valid, even with the official OpenEXR code.
Bad: Given that you said your original file is fine, but one of the copies is broken, it sounds like the problem might actually be your hard drive. Could some of the copies be corrupted by your system? Can you try to run your code on a different harddrive, maybe a different SSD or HDD?
I wrote a little unclearly.
I downloaded the original file from the github repository, but the file that I added here is not correct.
I created a fuzzer and to test it, I tried to test the image-rs library with it.
The fuzzer tried to mess up the original image to cause crashes in the library, and that's how I found this error and created broken file.
Oh, you are right, sorry. The library definitely shouldn't panic for invalid files, that's correct. Sorry for the confusion. Thanks again for submitting :)
Description
When testing file - https://github.com/user-attachments/files/16202898/compressed.zip - in 100 copies with this code
then randomly I see this panics (~5/10% chance, so that is why I test it in multiple copies)
Environment