diff options
| author | Felipe Pena <felipe@php.net> | 2010-12-10 17:50:26 +0000 |
|---|---|---|
| committer | Felipe Pena <felipe@php.net> | 2010-12-10 17:50:26 +0000 |
| commit | 83a78317609a09acd809598bffe4e8ca19a380b2 (patch) | |
| tree | 17fa75a881e7c81557eb777e7ac237030e2ca45a | |
| parent | 215917d71133b7aee85cd1438aaca0c2874e905a (diff) | |
| download | php-git-83a78317609a09acd809598bffe4e8ca19a380b2.tar.gz | |
- Fixed bug #53517 (segfault in pgsql_stmt_execute() when postgres is down)
patch by: gyp at balabit dot hu
| -rw-r--r-- | NEWS | 4 | ||||
| -rw-r--r-- | ext/pdo_pgsql/pgsql_statement.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -9,6 +9,10 @@ . Fixed bug #39199 (Cannot load Lob data with more than 4000 bytes on ORACLE 10). (spatar at mail dot nnov dot ru) +- PDO PostgreSQL driver: + . Fixed bug #53517 (segfault in pgsql_stmt_execute() when postgres is down). + (gyp at balabit dot hu) + - Zend Engine: . Indirect reference to $this fails to resolve if direct $this is never used in method. (Scott) diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c index b0829452f6..6380acbfc1 100644 --- a/ext/pdo_pgsql/pgsql_statement.c +++ b/ext/pdo_pgsql/pgsql_statement.c @@ -184,7 +184,7 @@ stmt_retry: * chance to DEALLOCATE the prepared statements it has created. so, if we hit a 42P05 we * deallocate it and retry ONCE (thies 2005.12.15) */ - if (!strcmp(sqlstate, "42P05")) { + if (sqlstate && !strcmp(sqlstate, "42P05")) { char buf[100]; /* stmt_name == "pdo_crsr_%08x" */ PGresult *res; snprintf(buf, sizeof(buf), "DEALLOCATE %s", S->stmt_name); |
