2008.03.01 15:47 "[Tiff] debian bug 425778: tiff2pdf with jpeg compression (4.0.0 alpha)", by Jay Berkenbilt

2008.03.01 15:47 "[Tiff] debian bug 425778: tiff2pdf with jpeg compression (4.0.0 alpha)", by Jay Berkenbilt

I'm taking the liberty of posting two debian bugs to the tiff mailing list. I had previously put these in bugzilla, but there was (uncharacteristically) no response, and now the bugzilla database seems to be gone (as discussed in previous posts).

This bug was reported against 3.8.2, but I can reproduce it with the current tiff CVS.

The full bug report is here:


This was bug 1568 in bugzilla.

Here was the text of bug 1568:

> This is debian bug 425778. For the original bug report, please see > http://bugs.debian.org/425778. It is a complete and well-written bug report.

> In this bug report, the user has a specific jpeg-compressed tiff

> which when converted to a PDF results in a PDF with a bad image. I > was trying to create a smaller tiff file with interesting results.

> The first one was just an 8x8 gray square. Running this through
> tiff2pdf resulted in a core dump. The second one was a 200x200 gray
> square. This one displays properly in acrobat reader with warnings,
> but the PDF file is invalid. I'm attaching my two files. For the
> original file, please see the debian bug report or grab the tiff
> file from

> http://eppesuigoccas.homedns.org/~giuseppe/libtiff-tools.tiff2pdf.bug.tar.bz2

I don't have the files I attached to the bugzilla bug. The debian bug file, referenced above, is still there.

This morning, I tried reproducing this with a 16x16 jpeg compressed tiff. When I did so, tiff2pdf generated the following:

*** glibc detected *** tiff2pdf: malloc(): memory corruption: 0x08057db0 *** ======= Backtrace: ========= /lib/i686/cmov/libc.so.6[0xb7ddf1e6]

/lib/i686/cmov/libc.so.6(__libc_malloc+0x8d)[0xb7de0b3d] /tmp/tiff-inst/lib/libtiff.so.5(_TIFFmalloc+0x1d)[0xb7f6bdcd] tiff2pdf[0x804f5fc]

======= Memory map: ========

08048000-08056000 r-xp 00000000 fe:02 38885703   /tmp/tiff-inst/bin/tiff2pdf
08056000-08057000 rw-p 0000d000 fe:02 38885703   /tmp/tiff-inst/bin/tiff2pdf
08057000-08078000 rw-p 08057000 00:00 0          [heap]
b7c00000-b7c21000 rw-p b7c00000 00:00 0 
b7c21000-b7d00000 ---p b7c21000 00:00 0 
b7d72000-b7d73000 rw-p b7d72000 00:00 0 
b7d73000-b7eba000 r-xp 00000000 fe:02 50333460   /lib/i686/cmov/libc-2.7.so
b7eba000-b7ebb000 r--p 00147000 fe:02 50333460   /lib/i686/cmov/libc-2.7.so
b7ebb000-b7ebd000 rw-p 00148000 fe:02 50333460   /lib/i686/cmov/libc-2.7.so
b7ebd000-b7ec0000 rw-p b7ebd000 00:00 0 
b7ec0000-b7ee3000 r-xp 00000000 fe:02 50333464   /lib/i686/cmov/libm-2.7.so
b7ee3000-b7ee5000 rw-p 00023000 fe:02 50333464   /lib/i686/cmov/libm-2.7.so
b7ee5000-b7ef9000 r-xp 00000000 fe:02 2776866    /usr/lib/libz.so.
b7ef9000-b7efa000 rw-p 00013000 fe:02 2776866    /usr/lib/libz.so.
b7efa000-b7efb000 rw-p b7efa000 00:00 0 
b7efb000-b7f19000 r-xp 00000000 fe:02 2280136    /usr/lib/libjpeg.so.62.0.0
b7f19000-b7f1a000 rw-p 0001e000 fe:02 2280136    /usr/lib/libjpeg.so.62.0.0
b7f1e000-b7f2a000 r-xp 00000000 fe:02 887        /lib/libgcc_s.so.1
b7f2a000-b7f2b000 rw-p 0000b000 fe:02 887        /lib/libgcc_s.so.1
b7f2b000-b7f2c000 rw-p b7f2b000 00:00 0 
b7f2c000-b7f2d000 r--s 00000000 fe:02 36792842   /tmp/a2.tif
b7f2d000-b7f90000 r-xp 00000000 fe:02 1085       /tmp/tiff-inst/lib/libtiff.so.5.0.0
b7f90000-b7f93000 rw-p 00063000 fe:02 1085       /tmp/tiff-inst/lib/libtiff.so.5.0.0
b7f93000-b7f95000 rw-p b7f93000 00:00 0 
b7f95000-b7fb1000 r-xp 00000000 fe:02 1054       /lib/ld-2.7.so
b7fb1000-b7fb3000 rw-p 0001b000 fe:02 1054       /lib/ld-2.7.so
bfeb0000-bfec6000 rw-p bfeb0000 00:00 0          [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]

I've attached the 16x16 tiff here. I have not attempted to do any further debugging.

Jay Berkenbilt <ejb@ql.org>