ImageMagick crashes on imperfect TIFF files

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
dirving
Posts: 13
Joined: 2008-08-28T13:45:14-07:00

ImageMagick crashes on imperfect TIFF files

Post by dirving »

It seems that ImageMagick 6.4.7 crashes when it encounters problems in a TIFF file where it would previously just warn. An example file is:

http://wbd.wbdhost.com/vn-0ixzcem.tif

If I run 'identify -verbose vn-0ixzcern.tif' using ImageMagick 6.4.7-4 I get a segmentation fault while if I run it using ImageMagick 6.3.8 I get:

[normal image information]
...
Properties:
Signature: b69cd3e762ba7bac64dc88e438ce40d36b516cac6cbcdd2172242a086dfb6342
Tiff:rows-per-strip: 2
Tiff:software: Adobe Photoshop CS3 Macintosh
Tiff:timestamp: 2008:11:04 08:48:30
Profiles:
Profile-icc: 557168 bytes
U.S. Web Coated (SWOP) v2
Profile-tiff:37724: 564464 bytes
Artifacts:
Verbose: true
Tainted: False
Version: ImageMagick 6.3.8 04/23/08 Q16 http://www.imagemagick.org
identify: ./vn-0ixzcem.tif: wrong data type 7 for "XMLPacket"; tag ignored. `TIFFReadDirectory'.
identify: ./vn-0ixzcem.tif: wrong data type 7 for "RichTIFFIPTC"; tag ignored. `TIFFReadDirectory'.
identify: ./vn-0ixzcem.tif: wrong data type 7 for "Photoshop"; tag ignored. `TIFFReadDirectory'.
identify: ./vn-0ixzcem.tif: unknown field with tag 37724 (0x935c) encountered. `TIFFReadDirectory'.

Valgrind states the following:

==4361== Invalid read of size 1
==4361== at 0x4007707: memcpy (mc_replace_strmem.c:402)
==4361== by 0x4210DA9: CopyMagickMemory (memory.c:459)
==4361== by 0x426B401: SetStringInfoDatum (string.c:1652)
==4361== by 0x4010483: ReadProfile (tiff.c:294)
==4361== by 0x4011C46: ReadTIFFImage (tiff.c:358)
==4361== by 0x417EF77: ReadImage (constitute.c:572)
==4361== by 0x40BECCB: MagickReadImage (magick-image.c:7613)
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: ImageMagick crashes on imperfect TIFF files

Post by magick »

We can reproduce the problem you reported and will have a patch for ImageMagick 6.4.7-5 available sometime tomorrow. Thanks.
Post Reply