]> granicus.if.org Git - php/commitdiff
Fixed bug #38168 (Crash in pdo_pgsql on missing bound parameters).
authorIlia Alshanetsky <iliaa@php.net>
Tue, 1 Aug 2006 16:31:29 +0000 (16:31 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 1 Aug 2006 16:31:29 +0000 (16:31 +0000)
NEWS
ext/pdo_pgsql/pgsql_statement.c

diff --git a/NEWS b/NEWS
index 6c766cbd9851c1181da10686b5658d94c7d1da1c..7bced946c32fbebf22f0e2b50ee9d51b0c2bf8ad 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -50,6 +50,7 @@ PHP                                                                        NEWS
 - Fixed bug #38194 (ReflectionClass::isSubclassOf() returns TRUE for the class
   itself). (Ilia)
 - Fixed bug #38173 (Freeing nested cursors causes OCI8 to segfault). (Tony)
+- Fixed bug #38168 (Crash in pdo_pgsql on missing bound parameters). (Ilia)
 - Fixed bug #38132 (ReflectionClass::getStaticProperties() retains \0 in key
   names). (Ilia)
 - Fixed bug #38047 ("file" and "line" sometimes not set in backtrace from
index d4c12cef2a7fc46c31f129706508d5229474eaee..a1488b5a39293afc3115338c22839ac0d5a4f6e6 100644 (file)
@@ -247,16 +247,16 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
                        case PDO_PARAM_EVT_EXEC_PRE:
                                if (!S->param_values) {
                                        S->param_values = ecalloc(
-                                                       zend_hash_num_elements(stmt->bound_params),
+                                                       zend_hash_num_elements(stmt->bound_param_map),
                                                        sizeof(char*));
                                        S->param_lengths = ecalloc(
-                                                       zend_hash_num_elements(stmt->bound_params),
+                                                       zend_hash_num_elements(stmt->bound_param_map),
                                                        sizeof(int));
                                        S->param_formats = ecalloc(
-                                                       zend_hash_num_elements(stmt->bound_params),
+                                                       zend_hash_num_elements(stmt->bound_param_map),
                                                        sizeof(int));
                                        S->param_types = ecalloc(
-                                                       zend_hash_num_elements(stmt->bound_params),
+                                                       zend_hash_num_elements(stmt->bound_param_map),
                                                        sizeof(Oid));
                                }
                                if (param->paramno >= 0) {