Access Violation when TIFF tag value cannot be allocated

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
johnbuuck
Posts: 5
Joined: 2014-06-20T12:44:51-07:00
Authentication code: 6789

Access Violation when TIFF tag value cannot be allocated

Post by johnbuuck »

When TIFF tags are being read and the memory allocation for a tag's data fails, the tag's pointer is correctly set to 0 and the error is noted at that time. However, later in TIFFGetProfiles(), when such a tag is encountered, the 0 pointer is dereferenced, causing an access violation. Adding

Code: Select all

 && profile != (unsigned char*)NULL
to each

Code: Select all

if (TIFFGetField(tiff,TIFFTAG_...,&length,&profile) == 1
conditional in TIFFGetProfiles() avoids this access violation.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Access Violation when TIFF tag value cannot be allocated

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.8.9-4 Beta, available by sometime tomorrow. Thanks.
Post Reply