xref: /PHP-8.2/ext/intl/tests/bug67397.phpt (revision 74859783)
1--TEST--
2Bug #67397 (Buffer overflow in locale_get_display_name->uloc_getDisplayName (libicu 4.8.1))
3--EXTENSIONS--
4intl
5--FILE--
6<?php
7
8function ut_main()
9{
10    $ret = var_export(ut_loc_get_display_name(str_repeat('*', 256), 'en_us'), true);
11    $ret .= "\n";
12    $ret .= var_export(intl_get_error_message(), true);
13    return $ret;
14}
15
16include_once( 'ut_common.inc' );
17ut_run();
18?>
19--EXPECT--
20false
21'locale_get_display_name : name too long: U_ILLEGAL_ARGUMENT_ERROR'
22