Package: libtk-img Version: 1:1.4.6+dfsg-1
Using Debian 9.9 i386 (32-bit). I am not sure if this bug should instead be reported against libtiff5 (4.0.8-2+deb9u4). A segmentation fault occurs when using the following 3-line script and an example image obtained from https://sourceforge.net/p/openil/svn/1479/tree/trunk/Test%20Images/TIF/libtiffpic/quad-jpeg.tif . I am not aware of any other example images that exhibit the exact same issue. package require Tk package require Img image create photo icon -file "libtiffpic/quad-jpeg.tif” -format tiff Here is the result of running this in Valgrind: $ valgrind --num-callers=100 wish8.6 img-tiff-segfault.tcl ==14493== Memcheck, a memory error detector ==14493== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==14493== Using Valgrind-3.12.0.SVN and LibVEX; rerun with -h for copyright info ==14493== Command: wish8.6 img-tiff-segfault.tcl … ==14493== Invalid read of size 4 ==14493== at 0x581659B: tagCompare (tif_dirinfo.c:349) ==14493== by 0x581659B: bsearch (stdlib-bsearch.h:33) ==14493== by 0x581659B: TIFFFindField (tif_dirinfo.c:526) ==14493== by 0x58168B1: TIFFFieldWithTag (tif_dirinfo.c:562) ==14493== by 0x5814A0C: _TIFFVSetField (tif_dir.c:709) ==14493== by 0x5815893: TIFFSetField (tif_dir.c:798) ==14493== by 0x581D78E: TIFFReadDirectory (tif_dirread.c:3623) ==14493== by 0x5841E99: TIFFClientOpen (tif_open.c:466) ==14493== by 0x57CBA8B: ChnRead (tiff.c:536) ==14493== by 0x48E2E2E: ImgPhotoConfigureMaster (tkImgPhoto.c:1947) ==14493== by 0x48E0586: ImgPhotoCreate (tkImgPhoto.c:360) ==14493== by 0x48D5F16: Tk_ImageObjCmd (tkImage.c:373) ==14493== by 0x49E8304: Dispatch (tclBasic.c:4357) ==14493== by 0x49E8357: TclNRRunCallbacks (tclBasic.c:4390) ==14493== by 0x49E776C: Tcl_EvalObjv (tclBasic.c:4120) ==14493== by 0x49E901B: TclEvalEx (tclBasic.c:5259) ==14493== by 0x4AA2F80: Tcl_FSEvalFileEx (tclIOUtil.c:1826) ==14493== by 0x4888399: Tk_MainEx (tkMain.c:342) ==14493== by 0x10880E: main (tkAppInit.c:78) ==14493== Address 0x832f8b00 is not stack'd, malloc'd or (recently) free'd ==14493== ==14493== ==14493== Process terminating with default action of signal 11 (SIGSEGV) ==14493== Access not within mapped region at address 0x832F8B00 ==14493== at 0x581659B: tagCompare (tif_dirinfo.c:349) ==14493== by 0x581659B: bsearch (stdlib-bsearch.h:33) ==14493== by 0x581659B: TIFFFindField (tif_dirinfo.c:526) ==14493== by 0x58168B1: TIFFFieldWithTag (tif_dirinfo.c:562) ==14493== by 0x5814A0C: _TIFFVSetField (tif_dir.c:709) ==14493== by 0x5815893: TIFFSetField (tif_dir.c:798) ==14493== by 0x581D78E: TIFFReadDirectory (tif_dirread.c:3623) ==14493== by 0x5841E99: TIFFClientOpen (tif_open.c:466) ==14493== by 0x57CBA8B: ChnRead (tiff.c:536) ==14493== by 0x48E2E2E: ImgPhotoConfigureMaster (tkImgPhoto.c:1947) ==14493== by 0x48E0586: ImgPhotoCreate (tkImgPhoto.c:360) ==14493== by 0x48D5F16: Tk_ImageObjCmd (tkImage.c:373) ==14493== by 0x49E8304: Dispatch (tclBasic.c:4357) ==14493== by 0x49E8357: TclNRRunCallbacks (tclBasic.c:4390) ==14493== by 0x49E776C: Tcl_EvalObjv (tclBasic.c:4120) ==14493== by 0x49E901B: TclEvalEx (tclBasic.c:5259) ==14493== by 0x4AA2F80: Tcl_FSEvalFileEx (tclIOUtil.c:1826) ==14493== by 0x4888399: Tk_MainEx (tkMain.c:342) ==14493== by 0x10880E: main (tkAppInit.c:78)

