Commit:    f1e2edff8befb7863723adbe5680ce3d9714d9ed
Author:    Andrey Hristov <and...@php.net>         Wed, 13 Mar 2013 13:37:51 
+0100
Parents:   bdaafe3c7b7f388e34078a0a9d7215c8d58acadb
Branches:  PHP-5.3 PHP-5.4 PHP-5.5 master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=f1e2edff8befb7863723adbe5680ce3d9714d9ed

Log:
fix for bug  #63530     mysqlnd_stmt::bind_one_parameter uses wrong alloc for 
stmt->param_bind

Bugs:
https://bugs.php.net/63530

Changed paths:
  M  NEWS
  M  ext/mysqlnd/mysqlnd_ps.c


Diff:
diff --git a/NEWS b/NEWS
index 82afa3a..fb877c0 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,10 @@ PHP                                                            
            NEWS
 - PCRE:
   . Merged PCRE 8.32). (Anatol)
 
+- mysqlnd
+  . Fixed bug #63530 (mysqlnd_stmt::bind_one_parameter crashes, uses wrong 
alloc
+    for stmt->param_bind). (Andrey)
+
 
 28 Feb 2013, PHP 5.3.23RC1
 
diff --git a/ext/mysqlnd/mysqlnd_ps.c b/ext/mysqlnd/mysqlnd_ps.c
index c553aa5..0020590 100644
--- a/ext/mysqlnd/mysqlnd_ps.c
+++ b/ext/mysqlnd/mysqlnd_ps.c
@@ -1485,7 +1485,7 @@ MYSQLND_METHOD(mysqlnd_stmt, 
bind_one_parameter)(MYSQLND_STMT * const s, unsigne
 
        if (stmt->param_count) {
                if (!stmt->param_bind) {
-                       stmt->param_bind = mnd_ecalloc(stmt->param_count, 
sizeof(MYSQLND_PARAM_BIND));
+                       stmt->param_bind = mnd_pecalloc(stmt->param_count, 
sizeof(MYSQLND_PARAM_BIND), stmt->persistent);
                        if (!stmt->param_bind) {
                                DBG_RETURN(FAIL);
                        }


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to