From: Felipe Pena Date: Tue, 16 Nov 2010 21:02:14 +0000 (+0000) Subject: - Fixed bug #53323 (pdo_firebird getAttribute() crash) X-Git-Tag: php-5.3.4RC1~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=49493e226d423ea21cb64dcdef02ea673a474e1d;p=php - Fixed bug #53323 (pdo_firebird getAttribute() crash) patch by: preeves at ibphoenix dot com --- diff --git a/NEWS b/NEWS index beed85c7a4..8ec41fb221 100644 --- a/NEWS +++ b/NEWS @@ -64,6 +64,8 @@ - Fixed the filter extension accepting IPv4 octets with a leading 0 as that belongs to the unsupported "dotted octal" representation. (Gustavo) +- Fixed bug #53323 (pdo_firebird getAttribute() crash). + (preeves at ibphoenix dot com) - Fixed bug #53305 (E_NOTICE when defining a constant starts with __COMPILER_HALT_OFFSET__). (Felipe) - Fixed bug #53297 (gettimeofday implementation in php/win32/time.c can return diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c index dc2f4e7511..2492667613 100644 --- a/ext/pdo_firebird/firebird_driver.c +++ b/ext/pdo_firebird/firebird_driver.c @@ -547,7 +547,7 @@ static int firebird_handle_get_attribute(pdo_dbh_t *dbh, long attr, zval *val TS 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); @@ -590,6 +590,10 @@ static int firebird_handle_get_attribute(pdo_dbh_t *dbh, long attr, zval *val TS ZVAL_STRING(val,tmp,1); return 1; } + + case PDO_ATTR_FETCH_TABLE_NAMES: + ZVAL_BOOL(val, H->fetch_table_names); + return 1; } return 0; }