Bug #79907 [NEW]: exif_read_data() corrupt EXIF header: maximum directory nesting level reached

From: Date: Tue, 28 Jul 2020 12:29:13 +0000
Subject: Bug #79907 [NEW]: exif_read_data() corrupt EXIF header: maximum directory nesting level reached
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-228249@lists.php.net to get a copy of this message
From:             php at lho dot io
Operating system: Linux
PHP version:      7.4.8
Package:          EXIF related
Bug Type:         Bug
Bug description:exif_read_data() corrupt EXIF header: maximum directory nesting level reached

Description:
------------
Might be the same problem as in https://bugs.php.net/bug.php?id=78083,
I'm no EXIF expert. In that case, let the reference photo be another
datapoint.

When reading exif data from an image (which works fine in exiftool), I
get the error:
PHP Warning:  exif_read_data(DSCF1362.jpg): corrupt EXIF header: maximum
directory nesting level reached in /home/leo/Downloads/test/script.php
on line 2

Geodata is missing in the result. 

Most images taken with the same camera (Fuji X-T30) and edited with
darktable work, but I have 8 images where this error happens. Upon
request, I can provide additional images. Link to the image causing this
specific error: https://gofile.io/d/A42LUr

Test script:
---------------
<?php
$exif = exif_read_data('DSCF1362.jpg', 0, true);
foreach ($exif as $key => $section) {
    foreach ($section as $name => $val) {
        echo "$key.$name: ";
        print_r($val);
        echo "<br />\n";
    }
}
?>

Expected result:
----------------
Should read all EXIF data correctly

Actual result:
--------------
Error message and missing data

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


Thread (8 messages)

« previous php.bugs (#228249) next »