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)