xref: /PHP-8.0/ext/intl/tests/bug67397.phpt (revision ded3d984)
1--TEST--
2Bug #67397 (Buffer overflow in locale_get_display_name->uloc_getDisplayName (libicu 4.8.1))
3--SKIPIF--
4<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
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