summaryrefslogtreecommitdiffstats
path: root/canonicalize.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2013-03-20 10:47:46 +0100
committerRemi Collet <fedora@famillecollet.com>2013-03-20 10:47:46 +0100
commit7eaf937e26f224836869f17f21d4e8dcc07f2380 (patch)
treee69d89f95147934d9f4081d13e70bf616f14811a /canonicalize.patch
parent3f927a7f3bb6554cab83c2c0ae8aa2cae01b80cb (diff)
icu: switch to 4.2.1 from RHEL-6
Diffstat (limited to 'canonicalize.patch')
-rw-r--r--canonicalize.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/canonicalize.patch b/canonicalize.patch
new file mode 100644
index 0000000..87a75a0
--- /dev/null
+++ b/canonicalize.patch
@@ -0,0 +1,22 @@
+Index: source/common/uloc.c
+===================================================================
+--- source/common/uloc.c (revision 113138)
++++ source/common/uloc.c (working copy)
+@@ -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;
+ }
+ }