|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-11-18 21:42 UTC] fmk@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
Description: ------------ mssql_bind() causes some buffer overruns & memleaks if you try to bind the same parameter *several times*. Reproduce code: --------------- <?php $c = mssql_connect($host, $user, $passwd); mssql_select_db($dbase); $r = mssql_init('nonex_stored_proc'); // that doesn't mean mssql_bind($r, "param", $param, SQLTEXT, 0, 0, 10); mssql_bind($r, "param", $param, SQLTEXT, 0, 0, 10); echo "Done\n"; ?> Expected result: ---------------- Done Actual result: -------------- [Thu Feb 17 16:18:27 2005] Script: '/www/index.php' --------------------------------------- /home/dev/php-src/Zend/zend_execute.h(127) : Block 0x082C2FF0 status: /home/dev/php-src/Zend/zend_execute.h(64) : Actual location (location was relayed) Beginning: OK (allocated on /home/dev/php-src/Zend/zend_vm_execute.h:157, 16 bytes) End: Overflown (magic=0x082C3764 instead of 0x2A8FCC84) At least 4 bytes overflown --------------------------------------- Done /home/dev/php-src/Zend/zend_vm_execute.h(157) : Freeing 0x082BF87C (16 bytes), script=/www/qa/tests/ext/mssql/030.php Last leak repeated 1 time /home/dev/php-src/Zend/zend_vm_execute.h(17922) : Freeing 0x082C3764 (16 bytes), script=/www/qa/tests/ext/mssql/030.php === Total 3 memory leaks detected ===