1 Index: source/common/uloc.c
2 ===================================================================
3 --- source/common/uloc.c (revision 68397)
4 +++ source/common/uloc.c (working copy)
6 keywordList[numKeywords].keyword[n++] = uprv_tolower(pos[i]);
10 + /* zero-length keyword is an error. */
12 + *status = U_INVALID_FORMAT_ERROR;
16 keywordList[numKeywords].keyword[n] = 0;
17 keywordList[numKeywords].keywordLen = n;
18 /* now grab the value part. First we skip the '=' */
20 while(*equalSign == ' ') {
24 + /* Premature end or zero-length value */
25 + if (!equalSign || equalSign == semicolon) {
26 + *status = U_INVALID_FORMAT_ERROR;
30 keywordList[numKeywords].valueStart = equalSign;
39 i = (int32_t)uprv_strlen(equalSign);
40 - while(equalSign[i-1] == ' ') {
41 + while(i && equalSign[i-1] == ' ') {
44 keywordList[numKeywords].valueLen = i;
46 int32_t variantLen = _deleteVariant(variant, uprv_min(variantSize, (nameCapacity-len)), variantToCompare, n);
49 - if (name[len-1] == '_') { /* delete trailing '_' */
50 + if (len > 0 && name[len-1] == '_') { /* delete trailing '_' */
53 addKeyword = VARIANT_MAP[j].keyword;
58 - if (name[len-1] == '_') { /* delete trailing '_' */
59 + if (len > 0 && len <= nameCapacity && name[len-1] == '_') { /* delete trailing '_' */
63 Index: source/common/uresbund.c
64 ===================================================================
65 --- source/common/uresbund.c (revision 122103)
66 +++ source/common/uresbund.c (working copy)
68 UResourceDataEntry *r = NULL;
69 UResourceDataEntry find;
70 /*int32_t hashValue;*/
73 char aliasName[100] = { 0 };
75 /*UBool isAlias = FALSE;*/
77 UBool hasChopped = TRUE;
78 UBool usingUSRData = U_USE_USRDATA && ( path == NULL || uprv_strncmp(path,U_ICUDATA_NAME,8) == 0);
81 - char usrDataPath[96];
83 + char usrDataPath[100];