Bug #74956 [Csd]: exif_read_data() causes Illegal IFD size

From: Date: Sat, 22 Jul 2017 21:08:30 +0000
Subject: Bug #74956 [Csd]: exif_read_data() causes Illegal IFD size
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-210207@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74956&edit=1 ID: 74956 Updated by: kalle@php.net Reported by: burzum at doomzone dot de Summary: exif_read_data() causes Illegal IFD size Status: Closed Type: Bug Package: EXIF related Operating System: Ubuntu Linux PHP Version: 7.0.21 Assigned To: kalle Block user comment: N Private report: N New Comment: ^ Ignore the commit, I was fixing another exif related bug Previous Comments: ------------------------------------------------------------------------ [2017-07-22 21:06:20] kalle@php.net I must admit, I don't think it will find its way to lower branches as its a part of a larger changeset to the exif extension in 7.2+ I'm afraid :( ------------------------------------------------------------------------ [2017-07-22 21:05:20] kalle@php.net Automatic comment from SVN on behalf of kalle Revision: http://svn.php.net/viewvc/?view=revision&revision=342694 Log: Fixed bug #74956 (exif_read_data() causes Illegal IFD size) ------------------------------------------------------------------------ [2017-07-22 14:16:30] burzum at doomzone dot de Here is the output for testing php7.2beta1. It works there. Is this going to be fix in 7.1 as well? C:\webstack λ .\php7\php.exe -v PHP 7.0.0 (cli) (built: Dec 3 2015 09:31:54) ( NTS ) Copyright (c) 1997-2015 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies with Xdebug v2.4.0RC2, Copyright (c) 2002-2015, by Derick Rethans C:\webstack λ .\php7.2beta1\php.exe -v PHP 7.2.0beta1 (cli) (built: Jul 18 2017 23:15:15) ( NTS MSVC15 (Visual C++ 2017) x86 ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.2.0-dev, Copyright (c) 1998-2017 Zend Technologies C:\webstack C:\webstack λ .\php7.2beta1\php.exe .\test.php array ( 'FileName' => 'Portrait_6.jpg', 'FileDateTime' => 1478695885, 'FileSize' => 136257, 'FileType' => 2, 'MimeType' => 'image/jpeg', 'SectionsFound' => 'ANY_TAG, IFD0, EXIF', 'COMPUTED' => array ( 'html' => 'width="600" height="450"', 'Height' => 450, 'Width' => 600, 'IsColor' => 1, 'ByteOrderMotorola' => 1, ), 'Orientation' => 6, 'XResolution' => '72/1', 'YResolution' => '72/1', 'ResolutionUnit' => 2, 'Exif_IFD_Pointer' => 90, 'ExifImageWidth' => 600, 'ExifImageLength' => 450, ) C:\webstack λ .\php7.1\php.exe .\test.php PHP Warning: exif_read_data(Portrait_6.jpg): Illegal IFD size in C:\webstack\test.php on line 3 Warning: exif_read_data(Portrait_6.jpg): Illegal IFD size in C:\webstack\test.php on line 3 array ( 'FileName' => 'Portrait_6.jpg', 'FileDateTime' => 1478695885, 'FileSize' => 136257, 'FileType' => 2, 'MimeType' => 'image/jpeg', 'SectionsFound' => 'ANY_TAG, IFD0, EXIF', 'COMPUTED' => array ( 'html' => 'width="600" height="450"', 'Height' => 450, 'Width' => 600, 'IsColor' => 1, 'ByteOrderMotorola' => 1, ), 'Orientation' => 6, 'XResolution' => '72/1', 'YResolution' => '72/1', 'ResolutionUnit' => 2, 'ExifImageWidth' => 600, 'ExifImageLength' => 450, ) C:\webstack λ ------------------------------------------------------------------------ [2017-07-21 21:12:30] kalle@php.net Can you test and confirm if this happens with PHP 7.2.0 Beta 1? ------------------------------------------------------------------------ [2017-07-20 11:52:48] burzum at doomzone dot de Description: ------------ This is basically a regression of * https://bugs.php.net/bug.php?id=72914 * https://bugs.php.net/bug.php?id=72819 that happens in 7.0.21 as well. See https://travis-ci.org/burzum/cakephp-imagine-plugin/jobs/255629376 or the excerpt of the log below: $ php --version PHP 7.0.21 (cli) (built: Jul 9 2017 15:30:45) ( ZTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.21, Copyright (c) 1999-2017, by Zend Technologies with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans 1.07s$ vendor/bin/phpunit PHPUnit 5.7.19 by Sebastian Bergmann and contributors. .......E................ 24 / 24 (100%) Time: 983 ms, Memory: 29.07MB There was 1 error: 1) Burzum\Imagine\Test\TestCase\Lib\ImagineUtilityTest::testGetImageOrientation exif_read_data(Portrait_6.jpg): Illegal IFD size /home/travis/build/burzum/cakephp-imagine-plugin/src/Lib/ImagineUtility.php:100 /home/travis/build/burzum/cakephp-imagine-plugin/tests/TestCase/Lib/ImagineUtilityTest.php:75 ERRORS! Tests: 24, Assertions: 31, Errors: 1. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74956&edit=1

« previous php.bugs (#210207) next »