Hello all, My tiff loading code fails on latest kali-linux where if I try to load an image from file stream and return 0 in a overloaded TIFFSizeProc [1]. I get warning messages that say:
> TIFFFetchDirectory: Warning, Requested memory size for TIFF directory of 156 > is > greather than filesize 0. Memory not allocated, TIFF directory not read. > TIFFReadDirectory: Failed to read directory at offset 10. and TIFFClientOpen returns an error. I couldn't reproduce the error on my ubuntu with official tarballs (and neither with git bisect but I didn't try too hard), but judging from the commit history, that issue was quickly solved around 31 Oct 2023. So my question is not really to fix that bug, as it seems to be already fixed last year, but rather advise what would be the best action to take here - check for TIFFLIB_VERSION is my code, report an upstream bug to kali, or something else? The confusion stems from that on this official kali virtual box image, where I could reproduce the bug, TIFFLIB_VERSION is 20230609 but the warning appeared in the code in October 2023, and `dpkg -l` says 4.5.1+git230720-4`; -- three different dates. That would be easy to dismiss as a packager problem, but probably you have experienced such problems before, so an advice would be appreciated. There could also be the case that I'm simply programming the library wrong by returning 0 in TIFFSizeProc, and with the scarce documentation, I couldn't find any definitive information about this. In any case, a small test case that demonstrates the issue is here[2]. [1] https://github.com/dk/Prima/issues/115 [2] https://github.com/dk/Prima/files/15218524/libtiff-bug.tar.gz -- Sincerely, Dmitry Karasik _______________________________________________ Tiff mailing list Tiff@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/tiff