diff options
author | Popa Adrian Marius <mapopa@reea.net> | 2014-04-08 14:11:58 +0300 |
---|---|---|
committer | Popa Adrian Marius <mapopa@reea.net> | 2014-04-08 17:50:41 +0300 |
commit | cc20351134b1217e068f3a424bb08b43d4ef4dbb (patch) | |
tree | 0a86f9105ea027fb058c6fd660bd103d421b307a | |
parent | a0beddf5e9ab3c6feaf0921be72a7f430597abea (diff) | |
download | php-git-cc20351134b1217e068f3a424bb08b43d4ef4dbb.tar.gz |
Fixes bug #66071: isc_interprete is unsafe and deprecated , it is replaced with fb_iterpret
-rw-r--r-- | ext/pdo_firebird/firebird_driver.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c index aa5e795594..72595de9f1 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); } |