php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50494 imagecreatefromjpeg() crashes when loading an empty file
Submitted: 2009-12-16 14:23 UTC Modified: 2009-12-16 14:42 UTC
From: dejangex at yahoo dot com Assigned:
Status: Not a bug Package: GD related
PHP Version: 5.3.0 OS: Windows XP Professional x64 SP2
Private report: No CVE-ID: None
 [2009-12-16 14:23 UTC] dejangex at yahoo dot com
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-12-16 14:42 UTC] jani@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 15 03:01:33 2024 UTC