php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #53517
Patch pdo_psql_segfault_fix revision 2010-12-16 20:48 UTC by faisal_sm1987 at yahoo dot com
revision 2010-12-10 12:26 UTC by gyp at balabit dot hu

Patch pdo_psql_segfault_fix for PostgreSQL related Bug #53517

Patch version 2010-12-10 12:26 UTC

Return to Bug #53517 | Download this patch
Patch Revisions:

Developer: gyp@balabit.hu

--- 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);

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 05:01:33 2024 UTC