Re: com php-src: Fixes bug #66071: isc_interprete is unsafe and deprecated , it is replaced with fb_iterpret: ext/pdo_firebird/firebird_driver.c

From: Date: Thu, 10 Apr 2014 04:06:25 +0000
Subject: Re: com php-src: Fixes bug #66071: isc_interprete is unsafe and deprecated , it is replaced with fb_iterpret: ext/pdo_firebird/firebird_driver.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-76753@lists.php.net to get a copy of this message
On Tue, Apr 8, 2014 at 1:11 PM, Popa Adrian Marius <mariuz@php.net> wrote: > Commit: 6d7093cbbea92642f6516c864ef93b3543d94703 > Author: Popa Adrian Marius <mapopa@reea.net> Tue, 8 Apr 2014 > 14:11:58 +0300 > Parents: 1157f81b2fde0029c4cb848c30668521f7faeb18 > Branches: master > > Link: > > http://git.php.net/?p=php-src.git;a=commitdiff;h=6d7093cbbea92642f6516c864ef93b3543d94703 > > Log: > Fixes bug #66071: isc_interprete is unsafe and deprecated , it is replaced > with fb_iterpret > > Bugs: > https://bugs.php.net/66071 > > Changed paths: > M ext/pdo_firebird/firebird_driver.c > > > Diff: > diff --git a/ext/pdo_firebird/firebird_driver.c > b/ext/pdo_firebird/firebird_driver.c > index aa5e795..72595de 100644 > --- a/ext/pdo_firebird/firebird_driver.c > +++ b/ext/pdo_firebird/firebird_driver.c > @@ -607,14 +607,14 @@ static int firebird_handle_get_attribute(pdo_dbh_t > *dbh, long attr, zval *val TS > static int pdo_firebird_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t > *stmt, zval *info TSRMLS_DC) /* {{{ */ > { > pdo_firebird_db_handle *H = (pdo_firebird_db_handle > *)dbh->driver_data; > - ISC_STATUS *s = H->isc_status; > + const ISC_STATUS *s = H->isc_status; > char buf[400]; > long i = 0, l, sqlcode = isc_sqlcode(s); > > if (sqlcode) { > add_next_index_long(info, sqlcode); > > - while ((l = isc_interprete(&buf[i],&s))) { > + while ((sizeof(buf)>(i+2))&&(l = > fb_interpret(&buf[i],(sizeof(buf)-i-2),&s))) { > i += l; > strcpy(&buf[i++], " "); > } > @@ -697,8 +697,8 @@ static int pdo_firebird_handle_factory(pdo_dbh_t *dbh, > zval *driver_options TSRM > > if (!dbh->methods) { > char errmsg[512]; > - ISC_STATUS *s = H->isc_status; > - isc_interprete(errmsg, &s); > + const ISC_STATUS *s = H->isc_status; > + fb_interpret(errmsg, sizeof(errmsg),&s); > zend_throw_exception_ex(php_pdo_get_exception(), > H->isc_status[1] TSRMLS_CC, "SQLSTATE[%s] [%d] %s", > "HY000", H->isc_status[1], errmsg); > } > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > hi, next time please don't forget also mentioning it in the NEWS -- Ferenc Kovács @Tyr43l - http://tyrael.hu

« previous php.cvs (#76753) next »