|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-04-30 06:00 UTC] sniper@php.net
[2003-04-30 10:49 UTC] Alla <svbevno at umailrusp dot am>
[2003-04-30 12:04 UTC] derick@php.net
[2003-04-30 12:16 UTC] Alla <svbevno at umailrusp dot am>
[2003-05-20 19:08 UTC] fmk@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 20:00:01 2025 UTC |
BUG: mssql_bind() causes memory access violation. The second call to mssql_bind (without mssql_init) leads to memory access violation: 'memory can not be written'. mssql_init() mssql_bind() mssql_execute() mssql_bind() // !!!!!!! CRASH !!!!!!! mssql_execute() ========================================================== LOCATION: Module : php4ts.dll, File : php_mssql.c Line : ! CRASH ! (see below) Cause : zend_hash_add(..) return NULL for the output variable 'bindp', and this is not checked in the code Possible Fix : add: if( NULL == bindp ) RETURN_FALSE; Existing code source: PHP_FUNCTION(mssql_bind) { ........ memset((void*)&bind,0,sizeof(mssql_bind)); zend_hash_add( statement->binds, Z_STRVAL_PP(param_name), Z_STRLEN_PP(param_name), &bind,sizeof(mssql_bind), (void **)&bindp ); // bindp == NULL here! bindp->zval = *var; // !!!!!! CRASH !!!!!!! zval_add_ref(var); if(.....) { ...... } RETURN_TRUE; }