php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7279 imageTTFText crashes
Submitted: 2000-10-17 10:58 UTC Modified: 2000-12-30 20:21 UTC
From: hgouhier at imaginet dot fr Assigned:
Status: Closed Package: GD related
PHP Version: 4.0.3pl1 OS: Linux 2.2.14-1mdklinus
Private report: No CVE-ID: None
 [2000-10-17 10:58 UTC] hgouhier at imaginet dot fr
here is my sample program:
<xmp>
<?
Header("Content-type: image/png");
$w = 44;
$h = 96;
$margin = 20;
$im = imagecreate($w, $h);
$white = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
$red = imagecolorallocate($im, 255, 0, 0);
imagefill($im, 1, 1, $white);
//imagerectangle($im, 0, 0, $w-1, $h-1, $red);
imageline($im, $margin, 0, $margin, $h-1, $black);

for ($i=0; $i<32; $i++)
{
	imageline ($im, $margin, $i * 3, $i%5==0 ? 10+$margin : 5+$margin, $i * 3, $black);
	if (($i>9) && ($i%10==0))
	{
		imageString($im, 0, $margin + 12, ($i * 3) - 3, strval($i), $black);
	}
}
imagettftext ($im, 2, 0, 0, $h/2, $red, "./arial.ttf", "test");
imagePNG($im);
imageDestroy($im);
?>
</xmp>


gdb: 
GNU gdb 19991116
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i586-mandrake-linux"...
(gdb) run -X
Starting program: /usr/local/apache/bin/httpd -X
Cannot access memory at address 0x404822b4
(gdb) bt
#0  0x4000a531 in _dl_debug_state () at dl-debug.c:57
#1  0x4013cac0 in _dl_close (map=0x80d6b70) at dl-close.c:195
#2  0x400693bb in dlclose_doit (handle=0x80d6b70) at dlclose.c:26
#3  0x4000a22e in _dl_catch_error (errstring=0x4006b05c, 
    operate=0x400693a0 <dlclose_doit>, args=0x80d6b70) at dl-error.c:141
#4  0x4006991f in _dlerror_run (operate=0x400693a0 <dlclose_doit>, 
    args=0x80d6b70) at dlerror.c:125
#5  0x4006938d in dlclose (handle=0x80d6b70) at dlclose.c:32
#6  0x8089526 in ap_os_dso_unload ()
#7  0x8066e59 in unload_module ()
#8  0x8069621 in run_cleanups ()
#9  0x8067c93 in ap_clear_pool ()
#10 0x8078a0c in standalone_main ()
#11 0x807936c in main ()
#12 0x40084c7e in __libc_start_main (main=0x8078fd4 <main>, argc=2, 
    argv=0xbfffefe4, init=0x804ecd0 <_init>, fini=0x80ae884 <_fini>, 
    rtld_fini=0x4000a490 <_dl_fini>, stack_end=0xbfffefdc)
    at ../sysdeps/generic/libc-start.c:92

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-30 13:22 UTC] derick@php.net
Could you possible remove some stuff from your script to narrow the search? Please make the script as short as possible for the crash to occur.
 [2000-10-30 13:23 UTC] derick@php.net
man ... i need coffee
 [2000-11-04 15:52 UTC] mathieu@php.net
What GD and Freetype version are you running?

 [2000-11-20 12:54 UTC] sniper@php.net
reclassified
 [2000-12-30 20:21 UTC] sniper@php.net
No feedback. If this happens with PHP 4.0.4, reopen this bug report.

--Jani
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Nov 13 15:01:28 2019 UTC