On Wed, 7 Jun 2023, Even Rouault wrote:
The suggested work-around caused the program to not work with older
libtiff, and even the most recent release. I just put a fix into
GraphicsMagick to solve that.
Can you point to the commit with your fix ? That could potentially be
interesting for others
My fixes are somewhat GraphicsMagick dependent, but the approach may
still be useful for others
First "Automate the collection of TIFF attributes. Fixes
"Stack-buffer-overflow in _TIFFVGetField.". This works based on
information from TIFFFieldPassCount() as suggested by yourself (Even
Rouault):
https://hg.osdn.net/view/graphicsmagick/GM/rev/9035beaece92
But then, after learning that older libtiff throws a "hard" error from
TIFFFieldWithTag() if it does not yet know about the tag, I added some
code to the error handler which matches the problematic error and
ignores it:
https://hg.osdn.net/view/graphicsmagick/GM/rev/b74667257bad
Perhaps a third addition will be to provided "legacy" behavior for
tags where TIFFFieldWithTag() returns NULL so that values are still
read.
Bob
--
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt
_______________________________________________
Tiff mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/tiff