Bug #69177 [NEW]: imagefilltoborder segfault

From: Date: Tue, 03 Mar 2015 19:13:27 +0000
Subject: Bug #69177 [NEW]: imagefilltoborder segfault
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-191103@lists.php.net to get a copy of this message
From:             polyanin at gmail dot com
Operating system: debian 8
PHP version:      5.6.6
Package:          GD related
Bug Type:         Bug
Bug description:imagefilltoborder segfault 

Description:
------------
kernel: [733793.955529] php5-fpm[7936]: segfault at 7fff43558ff8 ip
00007fd254b9f389 sp 00007fff43559000 error 6 in
libgd.so.3.0.0[7fd254b8f000+43000]

Test script:
---------------
<?php
// create a 200*200 image
$img = imagecreatetruecolor(200, 200);
// allocate some colors
$red   = imagecolorallocate($img, 255,   0,   0);
imagefilltoborder($img, 200, 200, $red, $red);
// output image in the browser
header("Content-type: image/png");
imagepng($img);
// free memory
imagedestroy($img);

Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff33b9382 in gdImageSetPixel () from
/usr/lib/x86_64-linux-gnu/libgd.so.3
(gdb) bt
#0  0x00007ffff33b9382 in gdImageSetPixel () from
/usr/lib/x86_64-linux-gnu/libgd.so.3
#1  0x00007ffff33baed3 in gdImageFillToBorder () from
/usr/lib/x86_64-linux-gnu/libgd.so.3
#2  0x00007ffff33bb064 in gdImageFillToBorder () from
/usr/lib/x86_64-linux-gnu/libgd.so.3
#3  0x00007ffff33bb086 in gdImageFillToBorder () from
/usr/lib/x86_64-linux-gnu/libgd.so.3
#4  0x00007ffff33bb064 in gdImageFillToBorder () from
/usr/lib/x86_64-linux-gnu/libgd.so.3
#5  0x00007ffff33bb086 in gdImageFillToBorder () from
/usr/lib/x86_64-linux-gnu/libgd.so.3
#6  0x00007ffff33bb064 in gdImageFillToBorder () from
/usr/lib/x86_64-linux-gnu/libgd.so.3
#7  0x00007ffff33bb086 in gdImageFillToBorder () from
/usr/lib/x86_64-linux-gnu/libgd.so.3
#8  0x00007ffff33bb064 in gdImageFillToBorder () from
/usr/lib/x86_64-linux-gnu/libgd.so.3
#9  0x00007ffff33bb086 in gdImageFillToBorder () from
/usr/lib/x86_64-linux-gnu/libgd.so.3
#10 0x00007ffff33bb064 in gdImageFillToBorder () from
/usr/lib/x86_64-linux-gnu/libgd.so.3
#11 0x00007ffff33bb086 in gdImageFillToBorder () from
/usr/lib/x86_64-linux-gnu/libgd.so.3
#12 0x00007ffff33bb064 in gdImageFillToBorder () from
/usr/lib/x86_64-linux-gnu/libgd.so.3
#13 0x00007ffff33bb086 in gdImageFillToBorder () from
/usr/lib/x86_64-linux-gnu/libgd.so.3
#14 0x00007ffff33bb064 in gdImageFillToBorder () from
/usr/lib/x86_64-linux-gnu/libgd.so.3


-- 
Edit bug report at https://bugs.php.net/bug.php?id=69177&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=69177&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=69177&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=69177&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=69177&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=69177&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=69177&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=69177&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=69177&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=69177&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=69177&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=69177&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=69177&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=69177&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69177&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=69177&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=69177&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=69177&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69177&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=69177&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=69177&r=mysqlcfg



Thread (5 messages)

« previous php.bugs (#191103) next »