#28147 [Asn->Csd]: Bundled GD2 crashes when antialias is enabled
| From: | derick@php.net | Date: | Sun, 25 Apr 2004 19:45:12 +0000 |
| Subject: | #28147 [Asn->Csd]: Bundled GD2 crashes when antialias is enabled | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-58744@lists.php.net to get a copy of this message | ||
ID: 28147
Updated by: derick@php.net
Reported By: jpgraph at aditus dot nu
-Status: Assigned
+Status: Closed
Bug Type: Reproducible crash
Operating System: Linux
PHP Version: 4.3.6
Assigned To: derick
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:
------------------------------------------------------------------------
[2004-04-25 21:27:51] derick@php.net
Verified, and it's indeed an egde-issue.
------------------------------------------------------------------------
[2004-04-25 21:12:28] jpgraph at aditus dot nu
Description:
------------
Bundled GD2 in 4.3.4, 4.3.5 and 4.3.6 crashes when antialias is
enabled.
When antialias is enabled through the imageantialias($img,$flag)
function then the Apache process crashes when trying to paint a line at
the edge of the image.
This is reproducible 100% using Apache 1.3.28 on our setup. If
antialias is disabled everything works fine.
It seems to be a boundary problem on the edge of the image. See example
below.
Reproduce code:
---------------
<?php
//
// This script will generate a Seg Fault on Linux
//
$im = imagecreatetruecolor(300, 300);
$w = imagecolorallocate($im, 255, 255, 255);
$red = imagecolorallocate($im, 255, 0, 0);
imagefilledrectangle($im,0,0,299,299,$w);
imageantialias($im,true);
imageline($im, 299, 299, 0, 299, $red);
header("Content-type: image/png");
imagepng($im);
imagedestroy($im);
?>
Expected result:
----------------
A line from bottom right corner to bottom left corner.
Actual result:
--------------
PHP Segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28147&edit=1