[php-src] PR #19600: uri: Fix normalization memory management for uri_parser_php_parse_url.c

From: Date: Tue, 26 Aug 2025 20:18:42 +0000
Subject: [php-src] PR #19600: uri: Fix normalization memory management for uri_parser_php_parse_url.c
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-32933@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/19600 Author: TimWolla There were two issues with the previous implementation of normalization: - php_raw_url_decode_ex() would be used to modify a string with RC >1. - The return value of php_raw_url_decode_ex() was not used, resulting in incorrect string lengths when percent-encoded characters are decoded. Additionally there was a bogus assertion that verified that strings returned from the read handlers are RC =2, which was not the case for the parse_url-based parser when repeatedly retrieving a component even without normalization happening. Remove that assertion, since its usefulness is questionable. Any obvious data type issues with read handlers should be detectable when testing during development. --------- This is a follow-up for the issue detected in #19587.

« previous php.git-pulls (#32933) next »