#50494 [NEW]: imagecreatefromjpeg() crashes when loading an empty file

From: Date: Wed, 16 Dec 2009 14:23:42 +0000
Subject: #50494 [NEW]: imagecreatefromjpeg() crashes when loading an empty file
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-145797@lists.php.net to get a copy of this message
From: dejangex at yahoo dot com Operating system: Windows XP Professional x64 SP2 PHP version: 5.3SVN-2009-12-16 (SVN) PHP Bug Type: Reproducible crash Bug description: imagecreatefromjpeg() crashes when loading an empty file Description: ------------ Im actually using XAMPP 1.7.2 with php 5.3.0. Using imagecreatefromjpeg('file.jpg') on an empty file, hangs and then crashes the apache server. The file.jpg is created by 'right click->new text document' and then renamed to 'file.jpg' so its empty. Reproduce code: --------------- <?php imagecreatefromjpeg('emptyfile.jpg'); ?> Expected result: ---------------- Get an image resource or false on failure Actual result: -------------- Apache crashes -- Edit bug report at http://bugs.php.net/?id=50494&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50494&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50494&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50494&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50494&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50494&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50494&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50494&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50494&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50494&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50494&r=support Expected behavior: http://bugs.php.net/fix.php?id=50494&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50494&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50494&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50494&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50494&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50494&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50494&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50494&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50494&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50494&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50494&r=mysqlcfg

« previous php.bugs (#145797) next »