Bug #72819 [Ver->Csd]: EXIF thumbnails not read anymore

From: Date: Fri, 07 Jul 2017 10:20:27 +0000
Subject: Bug #72819 [Ver->Csd]: EXIF thumbnails not read anymore
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209890@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72819&edit=1

 ID:                 72819
 Updated by:         kalle@php.net
 Reported by:        php dot bohwaz at miam dot kd2 dot org
 Summary:            EXIF thumbnails not read anymore
-Status:             Verified
+Status:             Closed
 Type:               Bug
 Package:            EXIF related
 Operating System:   Debian Linux Jessie
 PHP Version:        5.6.25
 Assigned To:        kalle
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of kalle
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e6903d471e45177c248adfb4f1abdfdd5487d7bf
Log: * Fixed bug #72819 (EXIF thumbnails not read anymore) * Fixed bug #62523 (php crashes with
segfault when exif_read_data called) * Fixed the poor test case for #62523, which was a HTML
document


Previous Comments:
------------------------------------------------------------------------
[2017-05-12 02:37:28] php dot bohwaz at miam dot kd2 dot org

Still broken in PHP 5.6.30 :(

$ php -v && php -r 'var_dump(strlen(exif_thumbnail("http://www.exiv2.org/include/img_1771.jpg")));'
PHP 5.6.30-0+deb8u1 (cli) (built: Feb  8 2017 08:50:21) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
PHP Warning:  exif_thumbnail(img_1771.jpg): IFD data bad offset: 0xFFFFFC52 length 0x01C2 in Command
line code on line 1

Warning: exif_thumbnail(img_1771.jpg): IFD data bad offset: 0xFFFFFC52 length 0x01C2 in Command line
code on line 1
int(0)

------------------------------------------------------------------------
[2017-03-25 00:18:54] crberry50 at gmail dot com

Still getting this error on 7.0.15... any more info needed from my config?

----  attributes of image file  ----

-rwxrwxrwx 1 root root 2839434 Mar 31  2013 IMG_4741.JPG*


----  source php script  ----

<?php
$file='IMG_4741.JPG';
$image = exif_thumbnail($file, $width, $height, $type);
echo "length is :" . strlen($image);
?>


----  output of running the script  ----


php phpBug.php

PHP Warning:  exif_thumbnail(IMG_4741.JPG): IFD data bad offset: 0xFFFFFCF2 length 0x0ED8 in
/home/crberry/familyarchive/php/phpBug.php on line 3
length is :0

----

php -v

PHP 7.0.15-0ubuntu0.16.04.4 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.15-0ubuntu0.16.04.4, Copyright (c) 1999-2017, by Zend Technologies

----

uname -a

Linux crberry-ThinkPad-R50e 4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:27:09 UTC 2017 i686 i686
i686 GNU/Linux

------------------------------------------------------------------------
[2017-02-18 03:56:49] stephan dot hesmer at gmail dot com

This is pretty ridiculous that it is still around. I will try to revert back to 5.4!

Here is the log for the latest that I tried:
PHP 7.1.1 (cli) (built: Feb 13 2017 10:05:49) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.1.1, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.5.0, Copyright (c) 2002-2016, by Derick Rethans
PHP Warning:  exif_thumbnail(img_1771.jpg): IFD data bad offset: 0xFFFFFC52 length 0x01C2 in Command
line code on line 1
PHP Stack trace:
PHP   1. {main}() Command line code:0
PHP   2. exif_thumbnail() Command line code:1

Warning: exif_thumbnail(img_1771.jpg): IFD data bad offset: 0xFFFFFC52 length 0x01C2 in Command line
code on line 1

Call Stack:
    0.0001     348240   1. {main}() Command line code:0
    0.0001     348240   2. exif_thumbnail() Command line code:1

Command line code:1:
int(0)

------------------------------------------------------------------------
[2017-02-04 23:44:34] evil+php at piekielko dot pl

Still the same on 5.6.30 (freebsd):
 php -v && php -r 'var_dump(strlen(exif_thumbnail("http://www.exiv2.org/include/img_1771.jpg")));'
PHP 5.6.30 (cli) (built: Jan 21 2017 01:17:54) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
PHP Warning:  exif_thumbnail(img_1771.jpg): IFD data bad offset: 0xFFFFFC52 length 0x01C2 in Command
line code on line 1
int(0)

------------------------------------------------------------------------
[2017-01-24 14:43:40] martin at the-inspired-ones dot de

Same for PHP 7.0.14:

$ php -v && php -r 'var_dump(strlen(exif_thumbnail("http://www.exiv2.org/include/img_1771.jpg")));'

PHP 7.0.14-2+deb.sury.org~xenial+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.14-2+deb.sury.org~xenial+1, Copyright (c) 1999-2016, by Zend Technologies

PHP Warning:  exif_thumbnail(img_1771.jpg): IFD data bad offset: 0xFFFFFC52 length 0x01C2 in Command
line code on line 1
int(0)

------------------------------------------------------------------------


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=72819


--
Edit this bug report at https://bugs.php.net/bug.php?id=72819&edit=1


Thread (28 messages)

« previous php.bugs (#209890) next »