From be51eb9c561e5163e1b8c44763997aa705305b53 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Tue, 16 Nov 2010 21:02:14 +0000 Subject: [PATCH] - Fixed bug #53323 (pdo_firebird getAttribute() crash) patch by: preeves at ibphoenix dot com --- NEWS | 2 ++ ext/pdo_firebird/firebird_driver.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 08f7bbcdb5..609a3ce2e6 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,8 @@ - Fixed NULL pointer dereference in ZipArchive::getArchiveComment. (CVE-2010-3709). (Maksymilian Arciemowicz) +- Fixed bug #53323 (pdo_firebird getAttribute() crash). + (preeves at ibphoenix dot com) - Fixed bug #52929 (Segfault in filter_var with FILTER_VALIDATE_EMAIL with large amount of data). (CVE-2010-3709). (Adam) - Fixed bug #52879 (Objects unreferenced in __get, __set, __isset or __unset diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c index 01d082d074..7fa4f2f173 100644 --- a/ext/pdo_firebird/firebird_driver.c +++ b/ext/pdo_firebird/firebird_driver.c @@ -508,7 +508,7 @@ static int firebird_handle_get_attribute(pdo_dbh_t const *dbh, long attr, zval * pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data; switch (attr) { - char tmp[200]; + char tmp[512]; case PDO_ATTR_AUTOCOMMIT: ZVAL_LONG(val,dbh->auto_commit); @@ -551,6 +551,10 @@ static int firebird_handle_get_attribute(pdo_dbh_t const *dbh, long attr, zval * ZVAL_STRING(val,tmp,1); return 1; } + + case PDO_ATTR_FETCH_TABLE_NAMES: + ZVAL_BOOL(val, H->fetch_table_names); + return 1; } return 0; } -- 2.40.0