From 4003833e0445ec4f427a1b4ba92c935226b29760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Mon, 8 Dec 2025 21:03:17 +0100 Subject: [PATCH] Try to reproduce GH-20668 --- .../tests/gh20668_global_buffer_overflow.phpt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 ext/uri/tests/gh20668_global_buffer_overflow.phpt diff --git a/ext/uri/tests/gh20668_global_buffer_overflow.phpt b/ext/uri/tests/gh20668_global_buffer_overflow.phpt new file mode 100644 index 0000000000000..ae6013500b01d --- /dev/null +++ b/ext/uri/tests/gh20668_global_buffer_overflow.phpt @@ -0,0 +1,18 @@ +--TEST-- +GH-20668 lobal buffer overflow in url.c +--FILE-- +getAsciiHost(); + +try { + $url->withHost($host); +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; +} + +?> +--EXPECT-- +Uri\WhatWg\InvalidUrlException: The specified host is malformed (DomainInvalidCodePoint)