You need to log in before you can comment on or make changes to this bug.
Created an attachment (id=784) [details] TIF file For 20170113091505_4548000_N0001P0001.TIF attached in the mail if we run the following command segmentation fault is happening tiff2pdf -o output.pdf 20170113091505_4548000_N0001P0001.TIF TIFFVSetField: sample.TIF: Bad value 0 for "RowsPerStrip". tiff2pdf: Can't set directory 3 of input file sample.TIF. TIFFSetField: Segmentation fault (core dumped) Attached is the file If you can help with this, waiting for your response. Thanks in advance
I can't reproduce any crash with latest CVS head. Works fine with -fsanitize=undefined,address & Valgrind
(In reply to comment #1) > I can't reproduce any crash with latest CVS head. Works fine with > -fsanitize=undefined,address & Valgrind Hi, Could you please provide the location of source code on which you are currently working. Waiting for response . Thanks in advance Regards Madhulika Singh
export CVSROOT=:pserver:cvsanon@cvs.maptools.org:/cvs/maptools/cvsroot cvs login (use empty password) cvs checkout libtiff
Hi, I tried to build the source provided by you in previous mail. But it is not getting build.My platform details are mentioned below Linux devoutputserver 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux. So I downloaded latest official build tiff-4.0.8 and replace the *.c and *.h with the ones provided by cvs and build it After building tiff2pdf is not crashing but it is giving error and file is not getting generated ./tiff2pdf -o output.pdf /home/madhulika/20170113091505_4548000_N0001P0001.TIF _TIFFVSetField: /home/madhulika/20170113091505_4548000_N0001P0001.TIF: Bad value 0 for "RowsPerStrip" tag. tiff2pdf: Can't set directory 3 of input file /home/madhulika/20170113091505_4548000_N0001P0001.TIF. tiff2pdf: An error occurred creating output PDF file. strace output shows mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b54da3e5000 lseek(4, 0, SEEK_SET) = 0 write(2, "_TIFFVSetField: ", 16_TIFFVSetField: ) = 16 write(2, "/home/madhulika/20170113091505_4"..., 89/home/madhulika/20170113091505_4548000_N0001P0001.TIF: Bad value 0 for "RowsPerStrip" tag) = 89 write(2, ".\n", 2. ) = 2 write(2, "tiff2pdf: ", 10tiff2pdf: ) = 10 write(2, "Can't set directory 3 of input f"..., 89Can't set directory 3 of input file /home/madhulika/20170113091505_4548000_N0001P0001.TIF) = 89 write(2, ".\n", 2. ) = 2 write(2, "tiff2pdf: ", 10tiff2pdf: ) = 10 write(2, "An error occurred creating outpu"..., 42An error occurred creating output PDF file) = 42 write(2, ".\n", 2. ) = 2 munmap(0x2b54da3c6000, 124626) = 0 close(-4294967293)
You must run autogen.sh before configure when working from a CVS checkout. OK, so this is now just a defect of tiff2pdf not working properly in that case. Probably linked to the multiple directories in the file
Hi, Could you please ellaborate what is the meaning of multiple directories. Regards Madhulika Singh
Hi, Just want to share an observation about the above tif file. The attached TIF file contain 4 pages but 4th page is also numbered as 03/06 that may be causing error. Could you please tell me when it is expected to be fixed as customer is blocked because of this. Waiting for response. Thanks in advance Regards Madhulika Singh
> Just want to share an observation about the above tif file. > The attached TIF file contain 4 pages but 4th page is also numbered as 03/06 >that may be causing error. Actually this TIFF file is corrupted. The 4th page has a height of 0 : Directory 3: offset 124404 (0x1e5f4) next 0 (0) SubFileType (254) LONG (4) 1<2> ImageWidth (256) LONG (4) 1<1728> ImageLength (257) LONG (4) 1<0> <-- wrong > Could you please tell me when it is expected to be fixed as customer is blocked because of this. This bug tracker is the one of the community project driven by volunteers, so there's no guarantee if and when a bug will be fixed. If your business depends on libtiff, then consider contracting a developer to fix it. Regarding this specific issue, the best fix would probably to have a flag to skip gracefully over corrupted pages.
Bugzilla is no longer used for tracking libtiff issues. Remaining open tickets, such as this one, have been migrated to the libtiff GitLab instance at https://gitlab.com/libtiff/libtiff/issues . The migrated tickets have their summary prefixed with [BZ#XXXX] where XXXX is the initial Bugzilla issue number.