Bug #75785 [Asn->Csd]: Many errors from exif_read_data
| From: | nikic@php.net | Date: | Tue, 11 Aug 2020 14:29:24 +0000 |
| Subject: | Bug #75785 [Asn->Csd]: Many errors from exif_read_data | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-228514@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75785&edit=1
ID: 75785
Updated by: nikic@php.net
Reported by: opajaap at opajaap dot nl
Summary: Many errors from exif_read_data
-Status: Assigned
+Status: Closed
Type: Bug
Package: EXIF related
Operating System: unknown
PHP Version: 7.2.1
Assigned To: kalle
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of nickolas@phpsp.org.br
Revision: http://git.php.net/?p=php-src.git;a=commit;h=2fa4ca95db262267aa6bd46c5e2f74aa42542fc3
Log: Fix bug #75785 by attempt switching endianness on Maker's Note
Previous Comments:
------------------------------------------------------------------------
[2020-07-12 20:32:21] nawarian at gmail dot com
Hello! I hope I'm not too late for the party.
I just sent a Pull Request (https://github.com/php/php-src/pull/5849) solving the above mentioned
issues (maximum nesting level and illegal ifd size). They relate to endianness on different camera
models from the same manufacturer.
I would be glad to receive some guidance on adding test cases for this fix.
Cheers!
------------------------------------------------------------------------
[2020-07-12 20:28:49] nawarian at gmail dot com
The following pull request has been associated:
Patch Name: Fix Bug #75785: Add extra check for Maker's Note endianness
On GitHub: https://github.com/php/php-src/pull/5849
Patch: https://github.com/php/php-src/pull/5849.patch
------------------------------------------------------------------------
[2019-07-09 17:51:08] richard at dpiworld dot com
exif_thumbnail() fails with PHP 7.2.20 on CentOS 7. Works fine with same images with PHP 5.6.40.
------------------------------------------------------------------------
[2019-01-22 01:48:26] richard at dpiworld dot com
Same issue using 7.2.14 on CentOS 7. Code and images work fine with PHP 5.4.16 but with PHP 7.2.14
exif text output is truncated so can't get GPS data. Can't extract thumbnails with
exif_thumbnail(). These things are critical for my application and will delay moving to PHP 7.
EXEC exiftool is slow. FYI, the vote system here gets an HTTP 500 error and fails.
------------------------------------------------------------------------
[2018-10-23 09:45:43] mike dot blomgren at tornado dot se
exif_read_data does not read all EXIF information in certain JPEG files.
Sample JPG here, that has the problem:
https://www.tornado.se/piwigo/tools/sample.jpg
Using exif_read_data produces the following output of 'sample.jpg':
https://www.tornado.se/piwigo/tools/metadata.php
I.e. it is not complete (using print_r and var_dump). The apache server produces the followong
errors in error_log:
[Tue Oct 23 11:38:47.425214 2018] [php7:notice] [pid 3514] [client 195.198.34.135:1104] PHP Warning:
read_exif_data(sample.jpg): Process tag(x010D=DocumentNam): Illegal components(0) in
/var/wwwtornado/htdocs/piwigo/tools/metadata.php on line 93
[Tue Oct 23 11:38:47.425234 2018] [php7:notice] [pid 3514] [client 195.198.34.135:1104] PHP Stack
trace:
[Tue Oct 23 11:38:47.425240 2018] [php7:notice] [pid 3514] [client 195.198.34.135:1104] PHP 1.
{main}() /var/wwwtornado/htdocs/piwigo/tools/metadata.php:0
[Tue Oct 23 11:38:47.425243 2018] [php7:notice] [pid 3514] [client 195.198.34.135:1104] PHP 2.
read_exif_data() /var/wwwtornado/htdocs/piwigo/tools/metadata.php:93
[Tue Oct 23 11:38:47.425353 2018] [php7:notice] [pid 3514] [client 195.198.34.135:1104] PHP Notice:
Undefined index: IFD0 in /var/wwwtornado/htdocs/piwigo/tools/metadata.php on line 110
[Tue Oct 23 11:38:47.425364 2018] [php7:notice] [pid 3514] [client 195.198.34.135:1104] PHP Stack
trace:
[Tue Oct 23 11:38:47.425370 2018] [php7:notice] [pid 3514] [client 195.198.34.135:1104] PHP 1.
{main}() /var/wwwtornado/htdocs/piwigo/tools/metadata.php:0
Using exif_read_data seems to 'cut' up to a certain point of the EXIF header. Specifically
I want to extract the DateTimeOriginal value, but php 7.2.11 isn't able to find the value.
Using jhead or exiftool fully decodes all the EXIF headers.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=75785
--
Edit this bug report at https://bugs.php.net/bug.php?id=75785&edit=1