1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 16:52:18 +01:00

Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Fixed Bug #64949 (Buffer overflow in _pdo_pgsql_error)
This commit is contained in:
Remi Collet
2013-05-31 08:44:33 +02:00

View File

@@ -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 {