Fixed bug #66584 Segmentation fault on statement deallocation

This commit is contained in:
Matteo Beccati 2014-11-01 19:11:43 +01:00
parent 1fc80d0ca7
commit 69f6aee35c
3 changed files with 68 additions and 1 deletions

View file

@ -294,7 +294,7 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
sizeof(Oid));
}
if (param->paramno >= 0) {
if (param->paramno > zend_hash_num_elements(stmt->bound_param_map)) {
if (param->paramno >= zend_hash_num_elements(stmt->bound_param_map)) {
pdo_pgsql_error_stmt(stmt, PGRES_FATAL_ERROR, "HY105");
return 0;
}