diff options
author | claireho <chinglanho@gmail.com> | 2012-02-14 15:19:56 -0800 |
---|---|---|
committer | claireho <chinglanho@gmail.com> | 2012-02-14 16:48:37 -0800 |
commit | 816c50fb47edc483a0516072584640b520045214 (patch) | |
tree | b685e4402232eab750d819efdae284273c0079c6 | |
parent | ab19ce4e2e94e2c9e847a6ae07773a48e4d40713 (diff) | |
download | icu4c-816c50fb47edc483a0516072584640b520045214.tar.gz |
Bug 6008414 - ICU uloc.c out of boundary read error.
A bug reported against Chrome. Android browser may have the same issue.
Change-Id: I8379c455fb8211479d46e6ba60c53d651ee71724
-rw-r--r-- | common/uloc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/uloc.c b/common/uloc.c index 4c61aa0b..49c73684 100644 --- a/common/uloc.c +++ b/common/uloc.c @@ -713,9 +713,12 @@ _getKeywords(const char *localeID, pos++; } else { i = (int32_t)uprv_strlen(equalSign); - while(equalSign[i-1] == ' ') { + /* BEGIN android-changed + For http://b/issue?id=6008774 : out-of-boundary memory access */ + while(i && equalSign[i-1] == ' ') { i--; } + /* END android-changed */ keywordList[numKeywords].valueLen = i; } /* If this is a duplicate keyword, then ignore it */ |