]> granicus.if.org Git - php/commitdiff
MFB: Fixed bug #44200 (A crash in PDO when no bound targets exists and yet
authorIlia Alshanetsky <iliaa@php.net>
Sun, 24 Feb 2008 16:09:05 +0000 (16:09 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 24 Feb 2008 16:09:05 +0000 (16:09 +0000)
bound parameters are present)

NEWS
ext/pdo/pdo_stmt.c

diff --git a/NEWS b/NEWS
index 20702f6671711dc5a943757c9c9787374dd5de65..52429777efc312945c059e4935a83f998fafef5b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,8 @@ PHP                                                                        NEWS
 
 
 - Fixed bug #44216 (strftime segfaults on large negative value). (Derick)
+- Fixed bug #44200 (A crash in PDO when no bound targets exists and yet 
+  bound parameters are present). (Ilia)
 - Fixed bug #44209 (strtotime() doesn't support 64 bit timestamps on 64 bit
   platforms). (Derick)
 - Fixed bug #44197 (socket array keys lost on socket_select). (Felipe)
index eac65790cf36c028bfbd88c98b923a137478bab6..00226316693afbbeeab097df51d3cd60ae34dbda 100755 (executable)
@@ -166,6 +166,10 @@ static int dispatch_param_event(pdo_stmt_t *stmt, enum pdo_param_event event_typ
 
        ht = stmt->bound_params;
 
+       if (ht && !stmt->bound_param_map) {
+               return 0;
+       }
+
 iterate:
        if (ht) {
                zend_hash_internal_pointer_reset(ht);