derick Tue Jul 5 08:50:04 2005 EDT Modified files: (Branch: PHP_4_4) /php-src NEWS /php-src/ext/pgsql pgsql.c Log: - MFH: Fixed memory corruption in pg_copy_from() in case the as_null parameter was passed. (Derick) http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.920.2.11&r2=1.1247.2.920.2.12&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.920.2.11 php-src/NEWS:1.1247.2.920.2.12 --- php-src/NEWS:1.1247.2.920.2.11 Sat Jul 2 19:07:50 2005 +++ php-src/NEWS Tue Jul 5 08:50:02 2005 @@ -1,8 +1,12 @@ PHP 4 NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| +11 Jul 2005, Version 4.4.0 +- Fixed memory corruption in pg_copy_from() in case the as_null parameter was + passed. (Derick) +- Fixed bug #30052 (Crash on shutdown after odbc_pconnect()). (Edin) + 01 Jul 2005, Version 4.4.0 RC2 - Fixed bug #31213 (Sideeffects caused by fix of bug #29493). (Dmitry) -- Fixed bug #30052 (Crash on shutdown after odbc_pconnect()). (Edin) - Fixed bug #28377 (debug_backtrace is intermittently passing args). (Dmitry) 13 Jun 2005, Version 4.4.0 RC1 http://cvs.php.net/diff.php/php-src/ext/pgsql/pgsql.c?r1=1.244.2.40&r2=1.244.2.40.2.1&ty=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.244.2.40 php-src/ext/pgsql/pgsql.c:1.244.2.40.2.1 --- php-src/ext/pgsql/pgsql.c:1.244.2.40 Tue May 10 19:15:06 2005 +++ php-src/ext/pgsql/pgsql.c Tue Jul 5 08:50:03 2005 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql.c,v 1.244.2.40 2005/05/10 23:15:06 tony2001 Exp $ */ +/* $Id: pgsql.c,v 1.244.2.40.2.1 2005/07/05 12:50:03 derick Exp $ */ #include <stdlib.h> @@ -2607,6 +2607,7 @@ zval **tmp; char *table_name, *pg_delim = NULL, *pg_null_as = NULL; int table_name_len, pg_delim_len, pg_null_as_len; + int pg_null_as_free = 0; char *query; char *query_template = "COPY \"\" FROM STDIN DELIMITERS ':' WITH NULL AS ''"; HashPosition pos; @@ -2626,6 +2627,7 @@ } if (!pg_null_as) { pg_null_as = safe_estrdup("\\\\N"); + pg_null_as_free = 1; } ZEND_FETCH_RESOURCE2(pgsql, PGconn *, &pgsql_link, id, "PostgreSQL link", le_link, le_plink); @@ -2638,7 +2640,9 @@ } pgsql_result = PQexec(pgsql, query); - efree(pg_null_as); + if (pg_null_as_free) { + efree(pg_null_as); + } efree(query); if (pgsql_result) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php