Kaydet (Commit) cf5d0e20 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: CVE-2011-4599

üst 37785dde
--- misc/icu/source/source/common/uloc.c
+++ misc/build/icu/source/common/uloc.c
@@ -1797,7 +1797,7 @@
int32_t variantLen = _deleteVariant(variant, uprv_min(variantSize, (nameCapacity-len)), variantToCompare, n);
len -= variantLen;
if (variantLen > 0) {
- if (name[len-1] == '_') { /* delete trailing '_' */
+ if (len > 0 && name[len-1] == '_') { /* delete trailing '_' */
--len;
}
addKeyword = VARIANT_MAP[j].keyword;
@@ -1805,7 +1805,7 @@
break;
}
}
- if (name[len-1] == '_') { /* delete trailing '_' */
+ if (len > 0 && len <= nameCapacity && name[len-1] == '_') { /* delete trailing '_' */
--len;
}
}
......@@ -52,7 +52,8 @@ PATCH_FILES=\
icu4c-4_4_2-wchar_t.patch \
icu4c-warnings.patch \
icu4c-escapespace.patch \
icu4c-strict-c.patch
icu4c-strict-c.patch \
CVE-2011-4599.patch
.IF "$(OS)"=="ANDROID"
PATCH_FILES+=\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment