php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20393 ImageCreateFromJpeg with uncomplete jpeg -> Apache 2 hangs -> taking 99% CPU
Submitted: 2002-11-12 10:11 UTC Modified: 2002-11-12 10:18 UTC
From: tobias-jamin at gmx dot de Assigned:
Status: Not a bug Package: *Graphics related
PHP Version: 4.2.3 OS: Windows XP Pro
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tobias-jamin at gmx dot de
New email:
PHP Version: OS:

 

 [2002-11-12 10:11 UTC] tobias-jamin at gmx dot de
I call the function createImageFromJpeg like the documentation tells:

*************

function myFunction($cImagefile) {
   $oImage = ImageCreateFromJpeg($cImagefile);

   if(!$oImage) // Error
      return false;
   else
      return true;
}

*************

I think $oImage will be invalid if $cImagefile is a uncomplete jpeg-file (the upload of the picture didn't finished) and my function will return false.
But Apache 2 takes 99% of CPU and hangs.

I have to stop the Apache 2 service and restart.

The "error/problem" doesn't appear with a completely uploaded jpeg-file because ImageCreateFromJpeg returns a valid image-ressource

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-12 10:18 UTC] tobias-jamin at gmx dot de
Error in summary. CreateImageFromJpeg must be ImageCreateFromJpeg
 [2003-03-22 13:56 UTC] fbn79 at libero dot it
I have the same problem whith php 4.3.0 apache2 on winxp pro
e php 4.3.0 iis and winxp pro
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Jul 13 08:01:25 2020 UTC