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

From: Date: Mon, 06 Oct 2014 11:45:33 +0000
Subject: Bug #66443 [Com]: Corrupt EXIF header: maximum directory nesting level reached for some cameras.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187881@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66443&edit=1

 ID:                 66443
 Comment by:         deemoos at live dot nl
 Reported by:        ianbeckett dot 0405 at gmail dot com
 Summary:            Corrupt EXIF header: maximum directory nesting level
                     reached for some cameras.
 Status:             Open
 Type:               Bug
 Package:            EXIF related
 Operating System:   Linux
 PHP Version:        5.5.7
 Block user comment: N
 Private report:     N

 New Comment:

Why is there no fix included in new PHP versions?


Previous Comments:
------------------------------------------------------------------------
[2014-08-22 10:15:42] hello at wentsch dot me

Thanks for your patch, took me a while to figure out it's a problem with the EXIF produced by
my camera, which is a Fujifilm X10 fyi.

------------------------------------------------------------------------
[2014-01-08 19:42:41] ianbeckett dot 0405 at gmail dot com

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 this bug report at https://bugs.php.net/bug.php?id=66443&edit=1


Thread (9 messages)

« previous php.bugs (#187881) next »