Bug #52212 [Opn->Fbk]: ImageCreateFromJPEG crashes web server when incorrect image format provided

From: Date: Wed, 30 Jun 2010 20:35:40 +0000
Subject: Bug #52212 [Opn->Fbk]: ImageCreateFromJPEG crashes web server when incorrect image format provided
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-151997@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=52212&edit=1

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

 New Comment:

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


Previous Comments:
------------------------------------------------------------------------
[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


Thread (9 messages)

« previous php.bugs (#151997) next »