From d10ff9bbd871b12133effb3db36f9da44c7fc88f Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 4 Sep 2025 22:27:58 +0200 Subject: [PATCH] Remove incorrect call to zval_ptr_dtor() in user_wrapper_metadata() This one is not initialized. This is not hittable from userspace code because all locations within first-party php-src code have a valid `option` argument. Closes GH-19714. --- NEWS | 4 ++++ main/streams/userspace.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index b2b2dccd1cd..79fd3eda917 100644 --- a/NEWS +++ b/NEWS @@ -36,6 +36,10 @@ PHP NEWS - Standard: . Fixed bug GH-16649 (UAF during array_splice). (alexandre-daubois) +- Streams: + . Remove incorrect call to zval_ptr_dtor() in user_wrapper_metadata(). + (nielsdos) + - Tidy: . Fixed GH-19021 build issue with libtidy in regard of tidyOptIsReadonly deprecation and TidyInternalCategory being available later than diff --git a/main/streams/userspace.c b/main/streams/userspace.c index 2a7380ce8f3..8d15172ef13 100644 --- a/main/streams/userspace.c +++ b/main/streams/userspace.c @@ -1223,7 +1223,6 @@ static int user_wrapper_metadata(php_stream_wrapper *wrapper, const char *url, i break; default: php_error_docref(NULL, E_WARNING, "Unknown option %d for " USERSTREAM_METADATA, option); - zval_ptr_dtor(&args[2]); return ret; }