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.

Environment

Status

Assignee

mow@icu-project.org

Reporter

TracBot

Time Needed

Days

tracCreated

Mar 07, 2008, 10:29 PM

tracOwner

michaelow

tracProject

ICU4C

tracReporter

dbertoni

tracResolution

fixed

tracReviewer

yoshito

tracStatus

closed

tracWeeks

1

Components

Fix versions

Priority

medium