ID:               34996
 Updated by:       [EMAIL PROTECTED]
 Reported By:      php at eder dot us
-Status:           Open
+Status:           Closed
 Bug Type:         GD related
 Operating System: FC 4, FreeBSD 5.3
 PHP Version:      5.0.5
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2005-10-26 23:05:48] php at eder dot us

Description:
------------
When ImageTrueColorToPalette is called with ncolors = to zero (or an
uninitialized variable), it segfaults.

Note: if $img is not loaded with a valid jpg, it will not crash, simply
error on bad image resource.  So make sure 'test.jpg' points to a valid
jpeg.

Reproduce code:
---------------
<?php
  $img = imagecreatefromjpeg('test.jpg');
  ImageTrueColorToPalette($img, false, 0);
?>

Expected result:
----------------
No expected output, simply $img should be an indexed image.

Actual result:
--------------
Segmentation fault



------------------------------------------------------------------------


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

Reply via email to