iliaa Wed Aug 27 20:33:48 2003 EDT Modified files: (Branch: PHP_4_3) /php-src NEWS /php-src/ext/pgsql pgsql.c Log: MFH: Fixed bug #25109 (Possible crash when fetching field names in pgsql) Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.360 php-src/NEWS:1.1247.2.361 --- php-src/NEWS:1.1247.2.360 Mon Aug 25 22:52:39 2003 +++ php-src/NEWS Wed Aug 27 20:33:47 2003 @@ -3,8 +3,9 @@ ?? ??? 2003, Version 4.3.4 - Fixed disk_total_space() and disk_free_space() under FreeBSD. (Jon Parise) - Fixed crash bug when non-existing save/serializer handler was used. (Jani) -- Fixed bug #25166 (WDDX serializer handler missing in win32). (Jani) - Fixed bug #25239 (ftp_fopen_wrapper not RFC compliant). (Sara) +- Fixed bug #25166 (WDDX serializer handler missing in win32). (Jani) +- Fixed bug #25109 (Possible crash when fetching field names in pgsql). (Ilia) 25 Aug 2003, Version 4.3.3 - Upgraded the bundled Expat library to version 1.95.6. (Jani) Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.244.2.22 php-src/ext/pgsql/pgsql.c:1.244.2.23 --- php-src/ext/pgsql/pgsql.c:1.244.2.22 Thu Aug 14 13:49:48 2003 +++ php-src/ext/pgsql/pgsql.c Wed Aug 27 20:33:48 2003 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql.c,v 1.244.2.22 2003/08/14 17:49:48 iliaa Exp $ */ +/* $Id: pgsql.c,v 1.244.2.23 2003/08/28 00:33:48 iliaa Exp $ */ #include <stdlib.h> @@ -1093,7 +1093,10 @@ char *tmp_oid, *end_ptr, *tmp_name; list_entry new_oid_entry; - if ((result = PQexec(pgsql,"select oid,typname from pg_type")) == NULL) { + if ((result = PQexec(pgsql,"select oid,typname from pg_type")) == NULL || PQresultStatus(result) != PGRES_TUPLES_OK) { + if (result) { + PQclear(result); + } smart_str_free(&str); return empty_string; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php