From 4621423e5e3c303fac87f3c16b2679fbc62ebe3d Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 21 Apr 2025 15:54:29 +0200 Subject: [PATCH] Fix uouv in pg_put_copy_end() Closes GH-18383. --- NEWS | 3 +++ ext/pgsql/pgsql.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 0790cae9530..efb76ac127a 100644 --- a/NEWS +++ b/NEWS @@ -56,6 +56,9 @@ PHP NEWS - PDO Sqlite: . Fix memory leak on error return of collation callback. (nielsdos) +- PgSql: + . Fix uouv in pg_put_copy_end(). (nielsdos) + - SPL: . Fixed bug GH-18322 (SplObjectStorage debug handler mismanages memory). (nielsdos) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index c0d4a5117ae..75b987d6b91 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -6215,7 +6215,7 @@ PHP_FUNCTION(pg_put_copy_end) { zval *pgsql_link; pgsql_link_handle *link; - zend_string *error; + zend_string *error = NULL; char *err = NULL; ZEND_PARSE_PARAMETERS_START(1, 2)