php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19941 ImageTrueColorToPalette crashes with bundled libgd with last parameter set to 0
Submitted: 2002-10-16 17:29 UTC Modified: 2002-10-16 17:35 UTC
From: mfischer@php.net Assigned:
Status: Closed Package: GD related
PHP Version: 4CVS-2002-10-16 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mfischer@php.net
New email:
PHP Version: OS:

 

 [2002-10-16 17:29 UTC] mfischer@php.net
Calling ImageTrueColorToPalette() with the last parameter set to 0 causes a segfault:

Program received signal SIGSEGV, Segmentation fault.
0x4013b84b in free () from /lib/libc.so.6
(gdb) bt
#0  0x4013b84b in free () from /lib/libc.so.6
#1  0x4013b6d3 in free () from /lib/libc.so.6
#2  0x080824da in gdFree (ptr=0x82897c0) at /home/mfischer/isrc/cvs/php4/ext/gd/libgd/gdhelpers.c:95
#3  0x08083515 in select_colors (im=0x8290b18, cquantize=0x82930c0, desired_colors=0) at /home/mfischer/isrc/cvs/php4/ext/gd/libgd/gd_topal.c:701
#4  0x08084804 in gdImageTrueColorToPalette (im=0x8290b18, dither=0, colorsWanted=0) at /home/mfischer/isrc/cvs/php4/ext/gd/libgd/gd_topal.c:1562
#5  0x0806b073 in zif_imagetruecolortopalette (ht=3, return_value=0x829321c, this_ptr=0x0, return_value_used=0) at /home/mfischer/isrc/cvs/php4/ext/gd/gd.c:648
#6  0x081af8e3 in execute (op_array=0x828ea14) at /home/mfischer/isrc/cvs/php4/Zend/zend_execute.c:1597
#7  0x0819ee49 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/mfischer/isrc/cvs/php4/Zend/zend.c:839
#8  0x0816d681 in php_execute_script (primary_file=0xbffffa40) at /home/mfischer/isrc/cvs/php4/main/main.c:1542
#9  0x081b5420 in main (argc=2, argv=0xbffffac4) at /home/mfischer/isrc/cvs/php4/sapi/cli/php_cli.c:695

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-16 17:35 UTC] rasmus@php.net
Fixed in CVS
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 17 17:01:27 2024 UTC