-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Saving tiff triggers segfault #7940
Comments
The problem is tag 33723. It is specified as LONG in the image, when it should be BYTE or UNDEFINED according to https://www.awaresystems.be/imaging/tiff/tifftags/iptc.html If I adjust Pillow to not preserve LONG tag 33723 by default, then it starts raising a Is it just the segfault you are concerned about, or do you think the image should save without any error? |
Thanks! Ideally it should save without error (it does with the older setting) |
What do you mean by 'older setting'? |
Oh, you mean Pillow 9.5.0. |
yes, Pillow 9.5.0 / libtiff 4.5.0 |
I tried testing Pillow 9.5.0 with libtiff 4.5.0 on Debian 12, and it still segfaulted, but nevertheless, I've figured out a solution. I've created #7948 to not save the tag automatically if it has the wrong type, without raising an error. |
Wonderful, thanks a lot! My test with the older version was on Debian 10 but it probably doesn't matter anymore |
What did you do?
I used the following simple script:
on the file contained in this zip:
https://eroux.fr/Image00386.zip
(too big to upload on the issue, sorry for that)
What did you expect to happen?
I expected no crash
What actually happened?
What are your OS, Python and Pillow versions?
Note that there is no segfault and a good output with the following setting:
The text was updated successfully, but these errors were encountered: