Bug 2422945 - Error message when attempting to identify TIFF file
Summary: Error message when attempting to identify TIFF file
Keywords:
Status: NEW
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: ImageMagick
Version: epel9
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Luya Tshimbalanga
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-12-16 22:37 UTC by Benjamin FRANCOIS
Modified: 2025-12-16 22:37 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
a TIFF file displaying the issue (29.47 KB, image/tiff)
2025-12-16 22:37 UTC, Benjamin FRANCOIS
no flags Details

Description Benjamin FRANCOIS 2025-12-16 22:37:46 UTC
Created attachment 2118974 [details]
a TIFF file displaying the issue

Description of problem:

Running identify on the attached TIFF file issues an error :

$ identify -format '%k' ./out16_instanceId.tiff
identify: Failed to allocate memory for to read TIFF directory (0 elements of 12 bytes each). `./out16_instanceId.tiff' @ error/tiff.c/TIFFErrors/586.
identify: Failed to read custom directory at offset 29706. `TIFFReadCustomDirectory' @ error/tiff.c/TIFFErrors/586.
1%

GraphicsMagick (from EPEL-9 too) properly returns the expected result :

$ /usr/bin/gm identify -format '%k' /disney/shows/soft/QE/images/test/out16_instanceId.tiff
10

Version-Release number of selected component (if applicable):

$ identify --version
Version: ImageMagick 6.9.13-25 Q16 x86_64 18639 https://legacy.imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP(4.5) 
Delegates (built-in): bzlib cairo djvu fontconfig freetype gslib gvc jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png ps raqm raw rsvg tiff webp wmf x xml zlib

I am also able to reproduce on a RHEL 10 system with the EPEL-10 build

$ identify --version
Version: ImageMagick 7.1.1-43 Q16-HDRI x86_64 22550 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(4.5) 
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib gvc heic jbig jng jp2 jpeg jxl lcms lqr ltdl lzma openexr pangocairo png ps raqm raw rsvg tiff webp wmf x xml zip zlib zstd
Compiler: gcc (14.2)

How reproducible:

Every time when ran on the attached TIFF. Randomly outputs the expected result on other TIFF files.

Steps to Reproduce:
1. download the attached TIFF file
2. run identify on it

Actual results:

identify: Failed to read custom directory at offset 29706. `TIFFReadCustomDirectory' @ error/tiff.c/TIFFErrors/586.

Expected results:

10

Additional info:

To the best of my knowledge, this is a valid TIFF file which does not issue any error with another tool.


Note You need to log in before you can comment on or make changes to this bug.