From: Ilia Alshanetsky Date: Tue, 1 Aug 2006 16:32:30 +0000 (+0000) Subject: MFB: Fixed bug #38168 (Crash in pdo_pgsql on missing bound parameters). X-Git-Tag: RELEASE_1_0_0RC1~2146 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=378b1181c266e2afc28bc6076b5496c7de512ffe;p=php MFB: Fixed bug #38168 (Crash in pdo_pgsql on missing bound parameters). --- diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c index e6499d73a1..4a8d4e1176 100644 --- a/ext/pdo_pgsql/pgsql_statement.c +++ b/ext/pdo_pgsql/pgsql_statement.c @@ -188,13 +188,13 @@ 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)); }