php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78701 exif_read_data: corrupt EXIF header: maximum directory nesting level reached
Submitted: 2019-10-20 14:43 UTC Modified: 2021-02-26 12:16 UTC
Votes:3
Avg. Score:4.7 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:1 (33.3%)
From: gino0631 at centaurus dot cloud Assigned: cmb (profile)
Status: Closed Package: EXIF related
PHP Version: 7.3.11 OS: CentOS
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gino0631 at centaurus dot cloud
New email:
PHP Version: OS:

 

 [2019-10-20 14:43 UTC] gino0631 at centaurus dot cloud
Description:
------------
exif_read_data with the following image:
https://maps.gisforthought.com/Photos/12_Adventure_Duck.jpg

produces:
"exif_read_data(12_Adventure_Duck.jpg): corrupt EXIF header: maximum directory nesting level reached

This looks similar to:
https://bugs.php.net/bug.php?id=75424

but opening a new issue as requested in the comment by @requinix.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-10-20 14:50 UTC] girgias@php.net
Related To: Bug #75424
 [2019-10-20 15:36 UTC] cmb@php.net
With PHP 7.3 (current HEAD) on Windows I get:

PHP Warning:  exif_read_data(78701.php): File not supported in %s on line %d
 [2019-10-20 22:12 UTC] gino0631 at centaurus dot cloud
wget https://maps.gisforthought.com/Photos/12_Adventure_Duck.jpg
echo '<?php $exif = exif_read_data("12_Adventure_Duck.jpg");' > test.php

/opt/remi/php71/root/bin/php --version
PHP 7.1.32 (cli) (built: Aug 28 2019 12:57:54) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies

/opt/remi/php71/root/bin/php test.php
# No error

/opt/remi/php72/root/bin/php --version
PHP 7.2.23 (cli) (built: Sep 25 2019 07:56:34) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

/opt/remi/php72/root/bin/php test.php
PHP Warning:  exif_read_data(12_Adventure_Duck.jpg): corrupt EXIF header: maximum directory nesting level reached in /tmp/test.php on line 1

/opt/remi/php73/root/bin/php --version
PHP 7.3.10 (cli) (built: Sep 24 2019 09:20:18) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.10, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.10, Copyright (c) 1999-2018, by Zend Technologies

/opt/remi/php73/root/bin/php test.php
PHP Warning:  exif_read_data(12_Adventure_Duck.jpg): corrupt EXIF header: maximum directory nesting level reached in /tmp/test.php on line 1
 [2019-10-23 20:36 UTC] gino0631 at centaurus dot cloud
-PHP Version: 7.3.10 +PHP Version: 7.3.11
 [2019-10-23 20:36 UTC] gino0631 at centaurus dot cloud
With PHP 7.2.24 and 7.3.11, the results are the same.
 [2019-12-29 02:03 UTC] gino0631 at centaurus dot cloud
Same with PHP 7.2.26 and 7.3.13.
 [2020-05-13 16:04 UTC] ton at meuleman dot net
Starting from March 18th the pictures made with my DSC-HX400V camera using exif_read_data returns the same error message.
The previous picture gives the correct result.
Using ExifToolGUI I discovered that something changed the compression settings of the camera from Compression JPEG (old style) in a couple of new entries.
I'm running PHP 7.4.3.0 on Windows 10.
 [2021-02-26 12:16 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-02-26 12:16 UTC] cmb@php.net
This is supposed to be fixed as of PHP 7.3.23 and 7.4.11,
respectively.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 02 23:01:29 2024 UTC