[php-src] Issue #11020: exif_read_data warns about Illegal IFD size on some images

From: Date: Wed, 05 Apr 2023 15:49:48 +0000
Subject: [php-src] Issue #11020: exif_read_data warns about Illegal IFD size on some images
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-244112@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/11020 Author: akkana ### Description (Split off from my comment in issue #9397) The following code: ```php <?php exif_read_data("img_5405.jpg", 0, true); ?> ``` Resulted in this output: ``` [php:warn] [pid 949] [client 127.0.0.1:36226] PHP Warning: exif_read_data(img_5405.jpg): Illegal IFD size in /home/akkana/web/tmp/exif-ifdsize/index.php on line 20 ``` But I expected this output instead: (no warning). A live test is available at: https://shallowsky.com/tmp/exif-ifdsize/ and the code it's using (index.php) can be downloaded here: https://shallowsky.com/tmp/exif-ifdsize/index.php.txt The image: http://localhost/tmp/exif-ifdsize/img_5405.jpg and I've also attached the files here: ![img_5405](https://user-images.githubusercontent.com/1451863/230130202-f06c7b21-1b90-4f5c-a400-b1813ac0bead.jpg) [index.php.txt](https://github.com/php/php-src/files/11160497/index.php.txt) I see this both on my local machine (PHP 8.2 from Debian sid) and on my web server (PHP 7.3 on Debian 10 buster). exiftool doesn't seem to have any complaints about the image's exif. ### PHP Version PHP 8.2 ### Operating System _No response_

« previous php.bugs (#244112) next »