Closed eroux closed 4 months ago
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 RuntimeError
instead.
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: