From:             
Operating system: 
PHP version:      5.3.3
Package:          PDO related
Bug Type:         Bug
Bug description:Some calls to pdo_firebird getAttribute crash

Description:
------------
There is a bug and a few omissions in firebird_handle_get_attribute.



Most significantly it declares tmp[200] which is used to store the server 

version. Unfortunately, a typical server version string is now over 300
bytes 

long. So this call just blows the driver out of the water, leaves this
error 

in the apache log:



*** stack smashing detected ***: /usr/sbin/httpd2-prefork terminated       
                                                                           
    

[Tue Nov 16 13:42:53 2010] [notice] child pid 11656 exit signal
Segmentation

fault (11)



and the user is left staring at a server timeout error in the browser. This
is 

easily fixed by declaring tmp[]  to be larger.



Less seriously, these attributes are not handled:



  PDO_ATTR_PREFETCH,

  PDO_ATTR_TIMEOUT,

  PDO_ATTR_FETCH_TABLE_NAMES



so if they are called outside a try..catch then the call will fail badly.
It 

is not obvious that a try..catch should be required so it is probably
better 

to just handle these cases in the driver.



I've attached a patch which fixes all of these issues.


-- 
Edit bug report at http://bugs.php.net/bug.php?id=53323&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=53323&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=53323&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=53323&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=53323&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=53323&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=53323&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=53323&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=53323&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=53323&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=53323&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=53323&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=53323&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=53323&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=53323&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=53323&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=53323&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=53323&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=53323&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=53323&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=53323&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=53323&r=mysqlcfg

Reply via email to