From 0ddb3d97de1f4c7e2a2a81182aa581ac76f2a300 Mon Sep 17 00:00:00 2001 From: Yasuo Ohgaki Date: Thu, 11 Jul 2013 12:23:11 +0900 Subject: [PATCH 1/2] Fixed meta data retrieve when OID is larger than 2^31 --- NEWS | 3 +++ ext/pdo_pgsql/pgsql_statement.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 323fed4d188..5507b2a29af 100644 --- a/NEWS +++ b/NEWS @@ -46,6 +46,9 @@ PHP NEWS . Allowed PDO_OCI to compile with Oracle Database 12c client libraries. (Chris Jones) +- PDO_pgsql: + . Fixed meta data retrieve when OID is larger than 2^31. (Yasuo) + - Phar: . Fixed Bug #65142 (Missing phar man page). (Remi) diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c index d58eebf8f43..3ef89196de7 100644 --- a/ext/pdo_pgsql/pgsql_statement.c +++ b/ext/pdo_pgsql/pgsql_statement.c @@ -587,7 +587,7 @@ static int pgsql_stmt_get_column_meta(pdo_stmt_t *stmt, long colno, zval *return add_assoc_long(return_value, "pgsql:oid", S->cols[colno].pgsql_type); /* Fetch metadata from Postgres system catalogue */ - spprintf(&q, 0, "SELECT TYPNAME FROM PG_TYPE WHERE OID=%d", S->cols[colno].pgsql_type); + spprintf(&q, 0, "SELECT TYPNAME FROM PG_TYPE WHERE OID=%u", S->cols[colno].pgsql_type); res = PQexec(S->H->server, q); efree(q); From 281936b29535ae095350abb274acef0ae548a431 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Fri, 12 Jul 2013 20:23:00 -0300 Subject: [PATCH 2/2] - Fixed bug #65227 (Memory leak in gmp_cmp second parameter) --- NEWS | 3 +++ ext/gmp/gmp.c | 1 + 2 files changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 5507b2a29af..ba2922dd798 100644 --- a/NEWS +++ b/NEWS @@ -26,6 +26,9 @@ PHP NEWS . Fixed bug #63983 (enabling FPM borks compile on FreeBSD). (chibisuke at web dot de, Felipe) +- GMP: + . Fixed bug #65227 (Memory leak in gmp_cmp second parameter). (Felipe) + - Imap: . Fixed bug #64467 (Segmentation fault after imap_reopen failure). (askalski at gmail dot com) diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index c9da09b230b..f8c3a0773b6 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -1333,6 +1333,7 @@ ZEND_FUNCTION(gmp_cmp) res = mpz_cmp_si(*gmpnum_a, Z_LVAL_PP(b_arg)); } else { res = mpz_cmp(*gmpnum_a, *gmpnum_b); + FREE_GMP_TEMP(temp_b); } FREE_GMP_TEMP(temp_a);