diff options
author | Remi Collet <remi@php.net> | 2013-05-31 08:46:18 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2013-05-31 08:46:18 +0200 |
commit | f8b4c0815a0c1a0dc53ea5d6fd1bca5912d15e8c (patch) | |
tree | 5a0e0fbfc64c7d756694d86dd0b37be8c49810d3 | |
parent | 0074cd2675687a25155cdde2ebc6b9f4a709c743 (diff) | |
parent | c829895a1a9f7d846e9044f9cf7bf9d29e2a3ac0 (diff) | |
download | php-git-f8b4c0815a0c1a0dc53ea5d6fd1bca5912d15e8c.tar.gz |
Merge branch 'PHP-5.5'
* PHP-5.5:
NEWS
NEWS
Fixed Bug #64949 (Buffer overflow in _pdo_pgsql_error)
Use size_t everywhere instead
This needs to be a long Otherwise we are limited to a 32G opcache segment
-rw-r--r-- | ext/pdo_pgsql/pgsql_driver.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index a54fccd0e6..252bfff25b 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -76,7 +76,7 @@ int _pdo_pgsql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, int errcode, const char * einfo->errmsg = NULL; } - if (sqlstate == NULL) { + if (sqlstate == NULL || strlen(sqlstate) >= sizeof(pdo_error_type)) { strcpy(*pdo_err, "HY000"); } else { |