OLD | NEW |
| (Empty) |
1 Index: source/common/uloc.c | |
2 =================================================================== | |
3 --- source/common/uloc.c (revision 113138) | |
4 +++ source/common/uloc.c (working copy) | |
5 @@ -713,7 +713,7 @@ | |
6 pos++; | |
7 } else { | |
8 i = (int32_t)uprv_strlen(equalSign); | |
9 - while(equalSign[i-1] == ' ') { | |
10 + while(i && equalSign[i-1] == ' ') { | |
11 i--; | |
12 } | |
13 keywordList[numKeywords].valueLen = i; | |
14 @@ -1797,7 +1797,7 @@ | |
15 int32_t variantLen = _deleteVariant(variant, uprv_min(variantSi
ze, (nameCapacity-len)), variantToCompare, n); | |
16 len -= variantLen; | |
17 if (variantLen > 0) { | |
18 - if (name[len-1] == '_') { /* delete trailing '_' */ | |
19 + if (len > 0 && name[len-1] == '_') { /* delete trailing '_'
*/ | |
20 --len; | |
21 } | |
22 addKeyword = VARIANT_MAP[j].keyword; | |
23 @@ -1805,7 +1805,7 @@ | |
24 break; | |
25 } | |
26 } | |
27 - if (name[len-1] == '_') { /* delete trailing '_' */ | |
28 + if (len > 0 && len <= nameCapacity && name[len-1] == '_') { /* dele
te trailing '_' */ | |
29 --len; | |
30 } | |
31 } | |
32 Index: source/common/uresbund.c | |
33 =================================================================== | |
34 --- source/common/uresbund.c (revision 122103) | |
35 +++ source/common/uresbund.c (working copy) | |
36 @@ -319,7 +319,7 @@ | |
37 UResourceDataEntry *r = NULL; | |
38 UResourceDataEntry find; | |
39 /*int32_t hashValue;*/ | |
40 - char name[96]; | |
41 + char name[100]; | |
42 char aliasName[100] = { 0 }; | |
43 int32_t aliasLen = 0; | |
44 /*UBool isAlias = FALSE;*/ | |
45 @@ -528,8 +528,8 @@ | |
46 UBool hasChopped = TRUE; | |
47 UBool usingUSRData = U_USE_USRDATA && ( path == NULL || uprv_strncmp(path,U
_ICUDATA_NAME,8) == 0); | |
48 | |
49 - char name[96]; | |
50 - char usrDataPath[96]; | |
51 + char name[100]; | |
52 + char usrDataPath[100]; | |
53 | |
54 initCache(status); | |
55 | |
OLD | NEW |