ID: 24174 Updated by: [EMAIL PROTECTED] Reported By: legion at altlinux dot org -Status: Open +Status: Feedback Bug Type: GD related Operating System: ALTLinux PHP Version: 4.3.2 New Comment:
And what was the configure line you used to configure PHP? (note: This does NOT crash for me) Previous Comments: ------------------------------------------------------------------------ [2003-06-13 08:33:40] legion at altlinux dot org 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 this bug report at http://bugs.php.net/?id=24174&edit=1