Bug #78083 [NEW]: exif_read_data() corrupt EXIF header: maximum directory nesting level reached
From: fermin at ares dot uy
Operating system: Windows 10
PHP version: 7.3.5
Package: EXIF related
Bug Type: Bug
Bug description:exif_read_data() corrupt EXIF header: maximum directory nesting level reached
Description:
------------
When using the function "exif_read_data()" on certain jpg images it
outputs this warning:
"Warning: exif_read_data(php7D62.tmp): corrupt EXIF header: maximum
directory nesting level reached in \path\to\index.php on line 4"
And the metadata field 'title' does not show up on the resulting array.
You can download a problematic image for testing here
https://ares.uy/P1110193.JPG
Test script:
---------------
<?php
if (!empty($_FILES)) {
$imagen = $_FILES['imagen']['tmp_name'];
$metadata = exif_read_data($imagen, 0, true);
highlight_string("<?php\n\$metadata =\n" . var_export($metadata, true)
. ";\n?>");
}
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>EXIF TEST</title>
</head>
<body>
<form action="/" method="post"
enctype="multipart/form-data">
<input type="file" name="imagen" value="">
<input type="submit" name="" value="Print EXIF">
</form>
</body>
</html>
Expected result:
----------------
No warning message and the complete list of metadata fields on the array
outputted by the function exif_read_data.
Actual result:
--------------
Warning message and incomplete metadata array.
--
Edit bug report at https://bugs.php.net/bug.php?id=78083&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=78083&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=78083&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=78083&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=78083&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78083&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78083&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78083&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78083&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78083&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78083&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78083&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78083&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78083&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78083&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=78083&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78083&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78083&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78083&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78083&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78083&r=mysqlcfg
Thread (8 messages)
- fermin at ares dot uy