@@ -607,14 +607,14 @@ static int firebird_handle_get_attribute(pdo_dbh_t *dbh, long attr, zval *val TS
607
607
static int pdo_firebird_fetch_error_func (pdo_dbh_t * dbh , pdo_stmt_t * stmt , zval * info TSRMLS_DC ) /* {{{ */
608
608
{
609
609
pdo_firebird_db_handle * H = (pdo_firebird_db_handle * )dbh -> driver_data ;
610
- ISC_STATUS * s = H -> isc_status ;
610
+ const ISC_STATUS * s = H -> isc_status ;
611
611
char buf [400 ];
612
612
long i = 0 , l , sqlcode = isc_sqlcode (s );
613
613
614
614
if (sqlcode ) {
615
615
add_next_index_long (info , sqlcode );
616
616
617
- while ((l = isc_interprete (& buf [i ],& s ))) {
617
+ while ((sizeof ( buf ) > ( i + 2 )) && ( l = fb_interpret (& buf [i ],( sizeof ( buf ) - i - 2 ) ,& s ))) {
618
618
i += l ;
619
619
strcpy (& buf [i ++ ], " " );
620
620
}
@@ -697,8 +697,8 @@ static int pdo_firebird_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRM
697
697
698
698
if (!dbh -> methods ) {
699
699
char errmsg [512 ];
700
- ISC_STATUS * s = H -> isc_status ;
701
- isc_interprete (errmsg , & s );
700
+ const ISC_STATUS * s = H -> isc_status ;
701
+ fb_interpret (errmsg , sizeof ( errmsg ), & s );
702
702
zend_throw_exception_ex (php_pdo_get_exception (), H -> isc_status [1 ] TSRMLS_CC , "SQLSTATE[%s] [%d] %s" ,
703
703
"HY000" , H -> isc_status [1 ], errmsg );
704
704
}
0 commit comments