Bug #66443 [NEW]: Corrupt EXIF header: maximum directory nesting level reached for some cameras.

From: Date: Wed, 08 Jan 2014 19:42:42 +0000
Subject: Bug #66443 [NEW]: Corrupt EXIF header: maximum directory nesting level reached for some cameras.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-183651@lists.php.net to get a copy of this message
From:             ianbeckett dot 0405 at gmail dot com
Operating system: Linux
PHP version:      5.5.7
Package:          EXIF related
Bug Type:         Bug
Bug description:Corrupt EXIF header: maximum directory nesting level reached for some cameras.

Description:
------------
EXIF data from certain cameras is not read correctly by
exif_read_data(), it fails part way through with the error "Corrupt EXIF
header: maximum directory nesting level reached".

My camera is a Fujifilm F770EXR and the two links below are additional
reports of the same problem with Fujifilm cameras. I don't know if any
other makes are affected.

http://stackoverflow.com/questions/11584238/php-corrupt-exif-data-error-with-fulifilm-photos

http://stackoverflow.com/questions/10075066/issues-extracting-exif-data-for-exif-2-3-using-php-version-5-2-9

I think the problem is due to the amount of extra tags Fujifilm include,
causing the code in exif.c to think the header is corrupt before it
finishes reading it all.

I think it can be fixed by increasing the value of MAX_IFD_NESTING_LEVEL
defined in ext/exif/exif.c. I used a value of 200 and it appears to have
resolved the problem on my installation.





-- 
Edit bug report at https://bugs.php.net/bug.php?id=66443&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=66443&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=66443&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=66443&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=66443&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=66443&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=66443&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=66443&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=66443&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=66443&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=66443&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=66443&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=66443&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=66443&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66443&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=66443&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=66443&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=66443&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66443&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=66443&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=66443&r=mysqlcfg



Thread (9 messages)

« previous php.bugs (#183651) next »