Bug #73514 [Opn->Dup]: imagecreatefromjpeg fatal error on non-jpg file

From: Date: Mon, 14 Nov 2016 15:43:51 +0000
Subject: Bug #73514 [Opn->Dup]: imagecreatefromjpeg fatal error on non-jpg file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-205365@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73514&edit=1 ID: 73514 Updated by: cmb@php.net Reported by: hrvoje dot novosel at gmail dot com Summary: imagecreatefromjpeg fatal error on non-jpg file -Status: Open +Status: Duplicate Type: Bug Package: GD related Operating System: Linux / CentOS 7 PHP Version: 7.0.13 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: I can confirm that this happens with an external libgd, but not with the bundled libgd, and that this ticket is a duplicate of bug #73479 (which might in turn be a duplicate of bug #73116, but I'm not sure, because I can't reproduce the reported behavior with the bundled libgd). Previous Comments: ------------------------------------------------------------------------ [2016-11-14 11:52:28] hrvoje dot novosel at gmail dot com Description: ------------ When you try to load a GIF or PNG via imagecreatefromjpeg function you get a Fatal error instead of a warning / return false. Probably related/same issue as https://bugs.php.net/bug.php?id=73116 Test script: --------------- $image = imagecreatefromjpeg('image.png'); Expected result: ---------------- warning and $image = false Actual result: -------------- Fatal error: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: Not a JPEG file: starts with .. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73514&edit=1

« previous php.bugs (#205365) next »