felipe Fri, 10 Dec 2010 17:50:26 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=306192
Log: - Fixed bug #53517 (segfault in pgsql_stmt_execute() when postgres is down) patch by: gyp at balabit dot hu Bug: http://bugs.php.net/53517 (Closed) segfault in pgsql_stmt_execute() when postgres is down Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/ext/pdo_pgsql/pgsql_statement.c U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/pdo_pgsql/pgsql_statement.c U php/php-src/trunk/ext/pdo_pgsql/pgsql_statement.c Modified: php/php-src/branches/PHP_5_2/NEWS =================================================================== --- php/php-src/branches/PHP_5_2/NEWS 2010-12-10 17:19:58 UTC (rev 306191) +++ php/php-src/branches/PHP_5_2/NEWS 2010-12-10 17:50:26 UTC (rev 306192) @@ -1,6 +1,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 5.2.16 +- Fixed bug #53517 (segfault in pgsql_stmt_execute() when postgres is down). + (gyp at balabit dot hu) - Fixed bug #53516 (Regression in open_basedir handling). (Ilia) 09 Dec 2010, PHP 5.2.15 Modified: php/php-src/branches/PHP_5_2/ext/pdo_pgsql/pgsql_statement.c =================================================================== --- php/php-src/branches/PHP_5_2/ext/pdo_pgsql/pgsql_statement.c 2010-12-10 17:19:58 UTC (rev 306191) +++ php/php-src/branches/PHP_5_2/ext/pdo_pgsql/pgsql_statement.c 2010-12-10 17:50:26 UTC (rev 306192) @@ -156,7 +156,7 @@ * 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); Modified: php/php-src/branches/PHP_5_3/NEWS =================================================================== --- php/php-src/branches/PHP_5_3/NEWS 2010-12-10 17:19:58 UTC (rev 306191) +++ php/php-src/branches/PHP_5_3/NEWS 2010-12-10 17:50:26 UTC (rev 306192) @@ -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) Modified: php/php-src/branches/PHP_5_3/ext/pdo_pgsql/pgsql_statement.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/pdo_pgsql/pgsql_statement.c 2010-12-10 17:19:58 UTC (rev 306191) +++ php/php-src/branches/PHP_5_3/ext/pdo_pgsql/pgsql_statement.c 2010-12-10 17:50:26 UTC (rev 306192) @@ -184,7 +184,7 @@ * 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); Modified: php/php-src/trunk/ext/pdo_pgsql/pgsql_statement.c =================================================================== --- php/php-src/trunk/ext/pdo_pgsql/pgsql_statement.c 2010-12-10 17:19:58 UTC (rev 306191) +++ php/php-src/trunk/ext/pdo_pgsql/pgsql_statement.c 2010-12-10 17:50:26 UTC (rev 306192) @@ -184,7 +184,7 @@ * 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 CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php