diff options
author | Matteo Beccati <mbeccati@php.net> | 2016-07-10 14:36:07 +0200 |
---|---|---|
committer | Matteo Beccati <mbeccati@php.net> | 2016-07-10 14:36:07 +0200 |
commit | 4d677ae0e2465188f59ec9226ee16011692286c8 (patch) | |
tree | f9c18cb806116be0b9cafb0dc2b3f721e6408986 /ext/pdo_pgsql/pgsql_statement.c | |
parent | 11d74b5b7977394f4dd02a8d6af34de10722beda (diff) | |
download | php-git-4d677ae0e2465188f59ec9226ee16011692286c8.tar.gz |
Fixed bug #72570 Segmentation fault when binding parameters on a query without placeholders
Diffstat (limited to 'ext/pdo_pgsql/pgsql_statement.c')
-rw-r--r-- | ext/pdo_pgsql/pgsql_statement.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c index 517a59718a..a5ee2e993e 100644 --- a/ext/pdo_pgsql/pgsql_statement.c +++ b/ext/pdo_pgsql/pgsql_statement.c @@ -292,6 +292,9 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data * break; case PDO_PARAM_EVT_ALLOC: + if (!stmt->bound_param_map) { + return 1; + } if (!zend_hash_index_exists(stmt->bound_param_map, param->paramno)) { pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "parameter was not defined"); return 0; |