Bug #52212 [NEW]: ImageCreateFromJPEG crashes web server when incorrect image format provided
From:
Operating system: Windows XP
PHP version: 5.3.2
Package: *Graphics related
Bug Type: Bug
Bug description:ImageCreateFromJPEG crashes web server when incorrect image format provided
Description:
------------
Call ImageCreateFromJPEG crashes web server when provided with invalid
image.
In this test scenario http://dl.dropbox.com/u/2807353/phpbugreport.zip
image provided is in PNG format. Image size is 300x300x24. My memory_limit
= 256M ImageCreateFromJPEG should return FALSE when called with invalid
data, instead it crashes web server.
Unhandled exception at 0x7c90108d in httpd.exe: 0xC0000005: Access
violation writing location 0x01547104.
Test script:
---------------
<?php
// you can download actual image and script from here:
// http://dl.dropbox.com/u/2807353/phpbugreport.zip
$moo = ImageCreateFromJPEG('img.jpg');
?>
Expected result:
----------------
ImageCreateFromJPEG() should return FALSE not crash webserver
Actual result:
--------------
Web server crashes
Unhandled exception at 0x7c90108d in httpd.exe: 0xC0000005: Access
violation writing location 0x01547104.
--
Edit bug report at http://bugs.php.net/bug.php?id=52212&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52212&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52212&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52212&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=52212&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52212&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=52212&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=52212&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=52212&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=52212&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=52212&r=support
Expected behavior: http://bugs.php.net/fix.php?id=52212&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=52212&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=52212&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=52212&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52212&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52212&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=52212&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=52212&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=52212&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=52212&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=52212&r=mysqlcfg
Thread (9 messages)
- phpbug at cano dot sk