Bug #66443 [Fbk->Csd]: Corrupt EXIF header: maximum directory nesting level reached for some cameras.

From: Date: Fri, 05 Aug 2016 05:53:22 +0000
Subject: Bug #66443 [Fbk->Csd]: 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-202936@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 Updated by: kalle@php.net Reported by: ianbeckett dot 0405 at gmail dot com Summary: Corrupt EXIF header: maximum directory nesting level reached for some cameras. -Status: Feedback +Status: Closed Type: Bug Package: EXIF related Operating System: Linux PHP Version: 5.5.7 Assigned To: kalle Block user comment: N Private report: N New Comment: Gonna mark this as fixed, ping me if 150 is too short so I can look into it, thanks! Previous Comments: ------------------------------------------------------------------------ [2016-08-03 10:00:57] kalle@php.net Please try using this snapshot: http://snaps.php.net/php-trunk-latest.tar.gz For Windows: http://windows.php.net/snapshots/ I just committed a fix for adding support for Panasonic formats, which involved increasing this limit to 150, can you confirm this still works with that, or do you need it to be 200 for the Fujifilm format to work? ------------------------------------------------------------------------ [2014-10-06 19:57:48] ianbeckett dot 0405 at gmail dot com I don't know why a fix is not included, it seems to be a very straightforward change with no side-effects. I have been applying the fix I described originally every time I upgrade php and it works very well. ------------------------------------------------------------------------ [2014-10-06 11:45:32] deemoos at live dot nl Why is there no fix included in new PHP versions? ------------------------------------------------------------------------ [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

« previous php.bugs (#202936) next »