Resolves: CVE-2011-4599

This commit is contained in:
Caolán McNamara 2011-12-12 12:44:34 +00:00
parent 37785dde4b
commit cf5d0e20f2
2 changed files with 22 additions and 1 deletions

20
icu/CVE-2011-4599.patch Normal file
View File

@ -0,0 +1,20 @@
--- 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;
}
}

View File

@ -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+=\