* PHP-5.3: Fixed Bug #64949 (Buffer overflow in _pdo_pgsql_error)
@ -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 {