AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2018.04.23 16:00 "[Tiff] libTiff Bug", by SM
2018.04.23 16:08 "Re: [Tiff] libTiff Bug", by Bob Friesenhahn
2018.04.24 20:18 "Re: [Tiff] libTiff Bug", by SM
2018.04.24 18:23 "Re: [Tiff] libTiff Bug", by SM
2018.04.24 18:35 "Re: [Tiff] libTiff Bug", by Even Rouault
2018.04.24 19:04 "Re: [Tiff] libTiff Bug", by Bob Friesenhahn
2018.04.24 20:14 "Re: [Tiff] libTiff Bug", by SM
2018.04.24 20:30 "Re: [Tiff] libTiff Bug", by Roger Leigh
2018.04.23 16:17 "Re: [Tiff] libTiff Bug", by Even Rouault
2018.04.23 16:29 "Re: [Tiff] libTiff Bug", by SM
2018.04.23 16:41 "Re: [Tiff] libTiff Bug", by SM
2018.04.23 19:11 "Re: [Tiff] libTiff Bug", by SM
2018.04.23 19:14 "Re: [Tiff] libTiff Bug", by Bob Friesenhahn

2018.04.23 16:00 "[Tiff] libTiff Bug", by SM

 Hi libTiff community,

libTiff library crashes for a particular large chunky tiled YCbCr image when using the RGBA interface.

I tried this with your latest libTiff version (4.0.9) and earlier versions as well.

#include <tiffio.h>

int main()
{
    TIFF *tif=TIFFOpen("Test_001.tif", "r");
    uint32 width;
    uint32 height;
    TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &width);
    TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &height);

    uint32 npixels=width*height;

    uint32* raster=(uint32 *) _TIFFmalloc(npixels *sizeof(uint32));
    TIFFReadRGBAImage(tif, width, height, raster, 0);

}

Stack trace

Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7b8920b in?? () from /usr/lib/x86_64-linux-gnu/libtiff.so.5 (gdb) bt

#0 0x00007ffff7b8920b in?? () from /usr/lib/x86_64-linux-gnu/libtiff.so.5 #1 0x00007ffff7b8eb77 in?? () from /usr/lib/x86_64-linux-gnu/libtiff.so.5 #2 0x00007ffff7b91405 in TIFFReadRGBAImageOriented () from /usr/lib/ x86_64-linux-gnu/libtiff.so.5

#3 0x00000000004007e0 in main () at main.c:12 <http://p4dbmaster.mathworks.com/cgi-bin/changeView.cgi?CH=12>

Please let me know if this can be fixed and in which release it will be fixed?

Thanks,
SM