]> granicus.if.org Git - php/commitdiff
- Fixed bug #53323 (pdo_firebird getAttribute() crash)
authorFelipe Pena <felipe@php.net>
Tue, 16 Nov 2010 21:02:14 +0000 (21:02 +0000)
committerFelipe Pena <felipe@php.net>
Tue, 16 Nov 2010 21:02:14 +0000 (21:02 +0000)
  patch by: preeves at ibphoenix dot com

NEWS
ext/pdo_firebird/firebird_driver.c

diff --git a/NEWS b/NEWS
index beed85c7a4828ccf5d61c05bf07c85df8cdb34df..8ec41fb2214fff83bbdb72c51846736d15bf13e2 100644 (file)
--- 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
index dc2f4e7511fa0d1904cf4f1642dfcf346e1fb6bb..24926676135aabeac7843343d0d48d85d7780561 100644 (file)
@@ -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;
 }