We're updating the issue view to help you get more done. 

uloc_getCountry needs to check country length

Description

Consider the locale "en-Latn-POSIX." Calling uloc_getCountry with this string returns the string "POSI" in the buffer, with a UErrorCode value of U_BUFFER_OVERFLOW_ERROR.

I think the easy fix is to make sure only subtags of length 2 or 3 are considered to be a country.

Status

Assignee

mow@icu-project.org

Reporter

TracBot

Labels

None

Reviewer

None

Time Needed

Days

Start date

None

Components

Fix versions

Priority

medium