summaryrefslogtreecommitdiffstats
path: root/main/icu/cve-2011-4599.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-01-10 14:28:39 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-01-10 14:29:24 +0000
commit2a47152a439b9747205655ca71541a917bbc6157 (patch)
tree46a887d3789fec528842a653814c46555a19bc31 /main/icu/cve-2011-4599.patch
parent0f63e4db14936f1f52c1958afda881f09036c8f7 (diff)
downloadaports-2a47152a439b9747205655ca71541a917bbc6157.tar.bz2
aports-2a47152a439b9747205655ca71541a917bbc6157.tar.xz
main/icu: security fix (CVE-2011-4599)
fixes #908
Diffstat (limited to 'main/icu/cve-2011-4599.patch')
-rw-r--r--main/icu/cve-2011-4599.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/main/icu/cve-2011-4599.patch b/main/icu/cve-2011-4599.patch
new file mode 100644
index 000000000..4243370c9
--- /dev/null
+++ b/main/icu/cve-2011-4599.patch
@@ -0,0 +1,20 @@
+--- ./common/uloc.c.orig
++++ ./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 && name[len-1] == '_') { /* delete trailing '_' */
+ --len;
+ }
+ }