From: legion at altlinux dot org Operating system: ALTLinux PHP version: 4.3.2 PHP Bug Type: GD related Bug description: Seg. fault when calling imagecreatefromstring
Description: ------------ Script segfaults when calling function imagecreatefromstring() with built-in font. PHP version: 4.3.2 (cvs snapshot 20030609) GD version: 2.0.4 Reproduce code: --------------- $tmpfilename = tempnam ("/tmp", "FOO"); $im = imagecreate(200, 100); $black = imagecolorallocate ($im, 0, 0, 0); $orange = imagecolorallocate($im, 220, 210, 60); imagefill($im, 0, 0, $black); $string = '::: Oops! :::'; imagestring($im, 3, 0, 10, $string, $orange); imagejpeg($im, $tmpfilename); imagedestroy($im); $fp = fopen($tmpfilename, 'r'); while (!feof ($fp)) { $content .= fgets($fp, 4096); } fclose($fp); $img = imagecreatefromstring($content); // following function will be work // $img = imagecreatefromjpeg($tmpfilename); header ("Content-type: image/jpeg"); imagejpeg($img); imagedestroy($img); unlink($tmpfilename); Expected result: ---------------- Must be generate jpeg image. Actual result: -------------- Segmentation fault -- Edit bug report at http://bugs.php.net/?id=24174&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24174&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24174&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24174&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24174&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24174&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24174&r=support Expected behavior: http://bugs.php.net/fix.php?id=24174&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24174&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24174&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24174&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24174&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24174&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24174&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24174&r=gnused