Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
  Fixed bug #66584 Segmentation fault on statement deallocation
This commit is contained in:
Matteo Beccati 2014-11-01 19:20:43 +01:00
commit e12d69df0c
2 changed files with 67 additions and 1 deletions

View file

@ -297,7 +297,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;
}