Bug #74956 [Fbk->Opn]: exif_read_data() causes Illegal IFD size
| From: | burzum at doomzone dot de | Date: | Sat, 22 Jul 2017 14:16:35 +0000 |
| Subject: | Bug #74956 [Fbk->Opn]: exif_read_data() causes Illegal IFD size | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-210193@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
User updated by: burzum at doomzone dot de
Reported by: burzum at doomzone dot de
Summary: exif_read_data() causes Illegal IFD size
-Status: Feedback
+Status: Open
Type: Bug
Package: EXIF related
Operating System: Ubuntu Linux
PHP Version: 7.0.21
Block user comment: N
Private report: N
New Comment:
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
λ
Previous Comments:
------------------------------------------------------------------------
[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