Edit report at http://bugs.php.net/bug.php?id=52212&edit=1

 ID:               52212
 User updated by:  phpbug at cano dot sk
 Reported by:      phpbug at cano dot sk
 Summary:          ImageCreateFromJPEG crashes web server when incorrect
                   image format provided
-Status:           Feedback
+Status:           Open
 Type:             Bug
 Package:          GD related
 Operating System: Windows XP
 PHP Version:      5.3.2

 New Comment:

Apache/2.2.11 (Win32) PHP/5.3.2 



apache2handler


Previous Comments:
------------------------------------------------------------------------
[2010-06-30 22:35:39] [email protected]

Sounds like it happens only with the 5.3 VC6 versions of our builds.
Which webserver and SAPI do you use?

------------------------------------------------------------------------
[2010-06-30 16:44:52] phpbug at cano dot sk

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 this bug report at http://bugs.php.net/bug.php?id=52212&edit=1

Reply via email to