From: [EMAIL PROTECTED] Operating system: Linux 32bit PHP version: 5CVS-2006-07-02 (CVS) PHP Bug Type: GD related Bug description: several invalid writes in ext/gd/tests/bug24594.phpt reported by valgrind
Description: ------------ See http://gcov.php.net/PHP_5_2/tests/ext/gd/tests/bug24594.mem ==12492== Invalid read of size 4 ==12492== at 0x81F4BF0: php_gd__gdImageFillTiled (gd.c:2001) ==12492== by 0x81F3FC8: php_gd_gdImageFill (gd.c:1892) ==12492== by 0x81E5E39: zif_imagefill (gd.c:3376) ==12492== by 0x8710D47: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200) ==12492== by 0x8715D49: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1642) ==12492== by 0x8710736: execute (zend_vm_execute.h:92) ==12492== by 0x86DCF66: zend_execute_scripts (zend.c:1110) ==12492== by 0x8665D89: php_execute_script (main.c:1748) ==12492== by 0x879B23C: main (php_cli.c:1097) ==12492== Address 0x4FD298C is 0 bytes after a block of size 612 alloc'd ==12492== at 0x401B65A: malloc (vg_replace_malloc.c:149) ==12492== by 0x86B0BC9: _emalloc (zend_alloc.c:182) ==12492== by 0x86B11E3: _ecalloc (zend_alloc.c:320) ==12492== by 0x81F478A: php_gd__gdImageFillTiled (gd.c:1967) ==12492== by 0x81F3FC8: php_gd_gdImageFill (gd.c:1892) ==12492== by 0x81E5E39: zif_imagefill (gd.c:3376) ==12492== by 0x8710D47: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200) ==12492== by 0x8715D49: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1642) ==12492== by 0x8710736: execute (zend_vm_execute.h:92) ==12492== by 0x86DCF66: zend_execute_scripts (zend.c:1110) ==12492== by 0x8665D89: php_execute_script (main.c:1748) ==12492== by 0x879B23C: main (php_cli.c:1097) ==12492== ==12492== Invalid read of size 4 ==12492== at 0x81F4C5D: php_gd__gdImageFillTiled (gd.c:2002) ==12492== by 0x81F3FC8: php_gd_gdImageFill (gd.c:1892) ==12492== by 0x81E5E39: zif_imagefill (gd.c:3376) ==12492== by 0x8710D47: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200) ==12492== by 0x8715D49: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1642) ==12492== by 0x8710736: execute (zend_vm_execute.h:92) ==12492== by 0x86DCF66: zend_execute_scripts (zend.c:1110) ==12492== by 0x8665D89: php_execute_script (main.c:1748) ==12492== by 0x879B23C: main (php_cli.c:1097) ==12492== Address 0x4FD298C is 0 bytes after a block of size 612 alloc'd ==12492== at 0x401B65A: malloc (vg_replace_malloc.c:149) ==12492== by 0x86B0BC9: _emalloc (zend_alloc.c:182) ==12492== by 0x86B11E3: _ecalloc (zend_alloc.c:320) ==12492== by 0x81F478A: php_gd__gdImageFillTiled (gd.c:1967) ==12492== by 0x81F3FC8: php_gd_gdImageFill (gd.c:1892) ==12492== by 0x81E5E39: zif_imagefill (gd.c:3376) ==12492== by 0x8710D47: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200) ==12492== by 0x8715D49: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1642) ==12492== by 0x8710736: execute (zend_vm_execute.h:92) ==12492== by 0x86DCF66: zend_execute_scripts (zend.c:1110) ==12492== by 0x8665D89: php_execute_script (main.c:1748) ==12492== by 0x879B23C: main (php_cli.c:1097) ==12492== ==12492== Invalid write of size 4 ==12492== at 0x81F4CD9: php_gd__gdImageFillTiled (gd.c:2007) ==12492== by 0x81F3FC8: php_gd_gdImageFill (gd.c:1892) ==12492== by 0x81E5E39: zif_imagefill (gd.c:3376) ==12492== by 0x8710D47: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200) ==12492== by 0x8715D49: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1642) ==12492== by 0x8710736: execute (zend_vm_execute.h:92) ==12492== by 0x86DCF66: zend_execute_scripts (zend.c:1110) ==12492== by 0x8665D89: php_execute_script (main.c:1748) ==12492== by 0x879B23C: main (php_cli.c:1097) ==12492== Address 0x4FD298C is 0 bytes after a block of size 612 alloc'd ==12492== at 0x401B65A: malloc (vg_replace_malloc.c:149) ==12492== by 0x86B0BC9: _emalloc (zend_alloc.c:182) ==12492== by 0x86B11E3: _ecalloc (zend_alloc.c:320) ==12492== by 0x81F478A: php_gd__gdImageFillTiled (gd.c:1967) ==12492== by 0x81F3FC8: php_gd_gdImageFill (gd.c:1892) ==12492== by 0x81E5E39: zif_imagefill (gd.c:3376) ==12492== by 0x8710D47: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200) ==12492== by 0x8715D49: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1642) ==12492== by 0x8710736: execute (zend_vm_execute.h:92) ==12492== by 0x86DCF66: zend_execute_scripts (zend.c:1110) ==12492== by 0x8665D89: php_execute_script (main.c:1748) ==12492== by 0x879B23C: main (php_cli.c:1097) Reproduce code: --------------- http://gcov.php.net/PHP_5_2/tests/ext/gd/tests/bug24594.phpt.phps Expected result: ---------------- . Actual result: -------------- . -- Edit bug report at http://bugs.php.net/?id=37992&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37992&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37992&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37992&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37992&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37992&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37992&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37992&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37992&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37992&r=support Expected behavior: http://bugs.php.net/fix.php?id=37992&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37992&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37992&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37992&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37992&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37992&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37992&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37992&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37992&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37992&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37992&r=mysqlcfg