From: Felipe Pena Date: Wed, 21 Apr 2010 01:18:19 +0000 (+0000) Subject: - Fixed bug #51617 (PDO PGSQL still broken against PostGreSQL < 7.4) X-Git-Tag: php-5.2.14RC1~56 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b678abf5797aac4c8388505354ca1c22ef2c46fe;p=php - Fixed bug #51617 (PDO PGSQL still broken against PostGreSQL < 7.4) # Just in this branch, as config.m4 in the 5_3 branch states that 7.4+ is required --- diff --git a/NEWS b/NEWS index fb21796df7..e6854c8d8a 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,8 @@ PHP NEWS - Fixed a NULL pointer dereference when processing invalid XML-RPC requests (Fixes CVE-2010-0397, bug #51288). (Raphael Geissert) +- Fixed bug #51617 (PDO PGSQL still broken against PostGreSQL < 7.4). + (Felipe, wdierkes at 5dollarwhitebox dot org) - Fixed bug #51615 (PHP crash with wrong HTML in SimpleXML). (Felipe) - Fixed bug #51609 (pg_copy_to: Invalid results when using fourth parameter). (Felipe) diff --git a/ext/pdo_pgsql/config.m4 b/ext/pdo_pgsql/config.m4 index 3abaf1306a..701fa1125c 100644 --- a/ext/pdo_pgsql/config.m4 +++ b/ext/pdo_pgsql/config.m4 @@ -92,6 +92,7 @@ if test "$PHP_PDO_PGSQL" != "no"; then AC_CHECK_LIB(pq, PQtransactionStatus,AC_DEFINE(HAVE_PGTRANSACTIONSTATUS,1,[PostgreSQL 7.4 or later])) AC_CHECK_LIB(pq, PQunescapeBytea,AC_DEFINE(HAVE_PQUNESCAPEBYTEA,1,[PostgreSQL 7.4 or later])) AC_CHECK_LIB(pq, PQExecParams,AC_DEFINE(HAVE_PQEXECPARAMS,1,[PostgreSQL 7.4 or later])) + AC_CHECK_LIB(pq, PQfreemem, AC_DEFINE(HAVE_PQFREEMEM,1,[PostgreSQL 7.4 or later])) AC_CHECK_LIB(pq, PQresultErrorField,AC_DEFINE(HAVE_PQRESULTERRORFIELD,1,[PostgreSQL 7.4 or later])) AC_CHECK_LIB(pq, pg_encoding_to_char,AC_DEFINE(HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT,1,[Whether libpq is compiled with --enable-multibyte])) diff --git a/ext/pdo_pgsql/php_pdo_pgsql_int.h b/ext/pdo_pgsql/php_pdo_pgsql_int.h index a2787f8fda..8d12c96a98 100644 --- a/ext/pdo_pgsql/php_pdo_pgsql_int.h +++ b/ext/pdo_pgsql/php_pdo_pgsql_int.h @@ -27,6 +27,10 @@ #include #include +#ifndef HAVE_PQFREEMEM +#define PQfreemem free +#endif + #define PHP_PDO_PGSQL_CONNECTION_FAILURE_SQLSTATE "08006" typedef struct {