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

 ID:                 52212
 Comment by:         alex at phpguide dot co dot il
 Reported by:        phpbug at cano dot sk
 Summary:            ImageCreateFromJPEG crashes web server when
                     incorrect image format provided
 Status:             Open
 Type:               Bug
 Package:            GD related
 Operating System:   Windows XP
 PHP Version:        5.3.2
 Block user comment: N
 Private report:     N

 New Comment:

Applies to PHP 5.3.4 & Apache 2.2.17

Appears critical, especially on virtual hosts.


Previous Comments:
------------------------------------------------------------------------
[2010-06-30 23:28:49] paj...@php.net

For an immediate fix you can use the VC9 version of apache and php.
Fetch Apache at http://apachelounge.com.

------------------------------------------------------------------------
[2010-06-30 22:50:49] phpbug at cano dot sk

Apache/2.2.11 (Win32) PHP/5.3.2 



apache2handler

------------------------------------------------------------------------
[2010-06-30 22:35:39] paj...@php.net

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