1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00

Merge branch 'PHP-8.5'

* PHP-8.5:
  uri: Fix RFC3986 to_string implementation with ExcludeFragment returning non-terminated strings (#20811)
This commit is contained in:
Niels Dossche
2026-01-02 15:00:58 +01:00

View File

@@ -595,6 +595,7 @@ ZEND_ATTRIBUTE_NONNULL static zend_string *php_uri_parser_rfc3986_to_string(void
const char *pos = zend_memrchr(ZSTR_VAL(uri_string), '#', ZSTR_LEN(uri_string));
if (pos != NULL) {
uri_string = zend_string_truncate(uri_string, (pos - ZSTR_VAL(uri_string)), false);
ZSTR_VAL(uri_string)[ZSTR_LEN(uri_string)] = '\0';
}
}