bug67397.phpt 468 B

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