]> 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

ext/pdo_firebird/firebird_driver.c

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;
 }