Seg fault with ImageFillToBorder and ImageColorAllocate
| Bug #22965 | Seg fault with ImageFillToBorder and ImageColorAllocate | ||||
|---|---|---|---|---|---|
| Submitted: | 2003-03-30 14:16 UTC | Modified: | 2003-03-30 14:48 UTC | ||
| From: | php at cipri dot com | Assigned: | |||
| Status: | Closed | Package: | GD related | ||
| PHP Version: | 4.3.2RC1 | OS: | Linux | ||
| Private report: | No | CVE-ID: | None | ||
[2003-03-30 14:16 UTC] php at cipri dot com
[php] $im = ImageCreate(1000, 768); ImageColorAllocate($im, 255, 255, 255); $color = ImageColorAllocate($im, 255, 255, 000); ImageFillToBorder($im, 1500, 384, $color, $color); [/php] This will crash with a Seg-fault. After swapping the two lines with the ICA() call no crash happens. PHP was compiled with: ./configure --enable-debug --with-gd=shared,/usr --with-png-dir=shared,/usr --with-zlib --with-zlib-dir=/usr I then ran php -q ~/test.php It dumped a core, and when I ran a bt in gdb I got the following output. #0 0x401ce59e in gdImageGetPixel () from /usr/lib/libgd.so.1 #1 0x401cef7e in gdImageFillToBorder () from /usr/lib/libgd.so.1 #2 0x401cf023 in gdImageFillToBorder () from /usr/lib/libgd.so.1 #3 0x401cf0a0 in gdImageFillToBorder () from /usr/lib/libgd.so.1 #4 0x401cf023 in gdImageFillToBorder () from /usr/lib/libgd.so.1 After this, line 3 and 4 repeat indefinately, it seems.
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2003-03-30 14:48 UTC] iliaa@php.net