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

From: Date: Tue, 08 Apr 2014 14:50:41 +0000
Subject: com php-src: Fixes bug #66071: isc_interprete is unsafe and deprecated , it is replaced with fb_it erpret: ext/pdo_firebird/firebird_driver.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-76726@lists.php.net to get a copy of this message
Commit: cc20351134b1217e068f3a424bb08b43d4ef4dbb Author: Popa Adrian Marius <mapopa@reea.net> Tue, 8 Apr 2014 14:11:58 +0300 Parents: a0beddf5e9ab3c6feaf0921be72a7f430597abea Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cc20351134b1217e068f3a424bb08b43d4ef4dbb 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); }

« previous php.cvs (#76726) next »