diff options
| author | Antony Dovgal <tony2001@php.net> | 2006-03-17 22:17:15 +0000 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2006-03-17 22:17:15 +0000 |
| commit | f5aecbf18cc2e1f57338bd6959ddee4e12e84a77 (patch) | |
| tree | f5535e22a804b8cc81255a75ded90dd6581838e4 /ext/pdo_pgsql/pgsql_statement.c | |
| parent | fb7324bb71048bb320d2c97c4924aadc5ef3aaa0 (diff) | |
| download | php-git-f5aecbf18cc2e1f57338bd6959ddee4e12e84a77.tar.gz | |
MFB: fix #36727 (segfault in pdo_pgsql bindValue() when no parameters are defined)
Diffstat (limited to 'ext/pdo_pgsql/pgsql_statement.c')
| -rw-r--r-- | ext/pdo_pgsql/pgsql_statement.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c index e47388e072..a3f9f908e0 100644 --- a/ext/pdo_pgsql/pgsql_statement.c +++ b/ext/pdo_pgsql/pgsql_statement.c @@ -174,7 +174,7 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data * } else { /* resolve parameter name to rewritten name */ char *nameptr; - if (SUCCESS == zend_hash_find(stmt->bound_param_map, + if (stmt->bound_param_map && SUCCESS == zend_hash_find(stmt->bound_param_map, param->name, param->namelen + 1, (void**)&nameptr)) { param->paramno = atoi(nameptr + 1) - 1; } else { |
