From 7e7817bc2f82570bbc510a2bf5e4e0ec09dbc774 Mon Sep 17 00:00:00 2001 From: Mikhail Galanin Date: Fri, 25 Aug 2023 16:43:01 +0100 Subject: [PATCH] Avoid using uninitialised struct Closes GH-12046. --- NEWS | 3 +++ ext/mysqlnd/mysqlnd_result.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index a528a8f878f..d0cb95eee4a 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,9 @@ PHP NEWS - LibXML: . Fixed bug GH-12702 (libxml2 2.12.0 issue building from src). (nono303) +- MySQLnd: + . Avoid using uninitialised struct. (mikhainin) + - OpenSSL: . Fixed bug #50713 (openssl_pkcs7_verify() may ignore untrusted CAs). (Jakub Zelenka) diff --git a/ext/mysqlnd/mysqlnd_result.c b/ext/mysqlnd/mysqlnd_result.c index b1a40049978..68a0255ee05 100644 --- a/ext/mysqlnd/mysqlnd_result.c +++ b/ext/mysqlnd/mysqlnd_result.c @@ -346,8 +346,8 @@ mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s) } MYSQLND_INC_CONN_STATISTIC(conn->stats, statistic); } + PACKET_FREE(&fields_eof); } while (0); - PACKET_FREE(&fields_eof); break; /* switch break */ } } while (0);