From c2805b88e57c27a5810d106942e8ebbc827478b0 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sun, 24 Feb 2008 16:09:05 +0000 Subject: [PATCH] MFB: Fixed bug #44200 (A crash in PDO when no bound targets exists and yet bound parameters are present) --- NEWS | 2 ++ ext/pdo/pdo_stmt.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 20702f6671..52429777ef 100644 --- 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) diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index eac65790cf..0022631669 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -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); -- 2.50.1