Bug #72278 [Csd]: getimagesize returning FALSE on valid jpg
Edit report at https://bugs.php.net/bug.php?id=72278&edit=1
ID: 72278
Updated by: cmb@php.net
Reported by: bfarber at invisiopower dot com
Summary: getimagesize returning FALSE on valid jpg
Status: Closed
Type: Bug
Package: GetImageSize related
Operating System: AWS / Windows
PHP Version: 5.6.22
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
> That appears also the solution chosen by ImageMagick, but not by
> ext/gd.
For the record: the behavior of ext/gd depends on the ini setting
gd.jpeg_ignore_warnings. If this is enabled, the corrupted image
can be read; otherwise imagecreatefromjpeg() returns FALSE when
build against classic libjpeg. Apparently, libjpeg-turbo doesn't
even report an unrecoverable error here, so the image could always
be read.
Previous Comments:
------------------------------------------------------------------------
[2016-08-13 14:40:09] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=82df4e263886a0da21a00c98189649287666ba5c
Log: Fix #72278: getimagesize returning FALSE on valid jpg
------------------------------------------------------------------------
[2016-08-13 12:59:11] cmb@php.net
While fixing this issue, I've stumbled upon bug #13213, which has
been fixed for that very special case only. IMO, it would have
been better to follow mul at rentapacs dot com's suggestion to
simply skip any extraneous bytes (plus raising a warning). That
appears also the solution chosen by ImageMagick, but not by ext/gd
(I'll have a closer look at that later).
------------------------------------------------------------------------
[2016-06-05 04:47:28] requinix@php.net
@bfarber uploaded one to http://bfarber.com/getimagesize_test/image.jpg,
which is still accessible. (I've tried a couple free hosting places but they reprocess images.)
------------------------------------------------------------------------
[2016-06-05 04:22:26] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
------------------------------------------------------------------------
[2016-05-28 04:01:19] pajoye@php.net
Can you upload the image somewhere pls or send it to me pls?
------------------------------------------------------------------------
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=72278
--
Edit this bug report at https://bugs.php.net/bug.php?id=72278&edit=1
Thread (9 messages)