ICU-9114 buffer overflow in _getKeyword() in uloc.cpp

X-SVN-Rev: 31396
This commit is contained in:
Jungshik Shin 2012-02-15 00:19:17 +00:00
parent 1be259b287
commit 5dd029e6e5

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1997-2011, International Business Machines
* Copyright (C) 1997-2012, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*
@ -706,7 +706,7 @@ _getKeywords(const char *localeID,
pos++;
} else {
i = (int32_t)uprv_strlen(equalSign);
while(equalSign[i-1] == ' ') {
while(i && equalSign[i-1] == ' ') {
i--;
}
keywordList[numKeywords].valueLen = i;