imported patch removeCVEleftover
authorPavel Heimlich <pavel.heimlich@oracle.com>
Mon, 22 Nov 2010 09:54:44 +0100
changeset 45 f7c2ead21fed
parent 44 e40f7cd559ea
child 46 bbb379f35dc0
imported patch removeCVEleftover
icu/icu.spec
icu/patches/source_i18n_regexcmp.cpp.patch
icu/patches/source_test_intltest_regextst.cpp.patch
--- a/icu/icu.spec	Mon Nov 22 09:54:44 2010 +0100
+++ b/icu/icu.spec	Mon Nov 22 09:54:44 2010 +0100
@@ -42,7 +42,6 @@
 Patch10: source_data_mappings_convrtrs.txt.patch
 Patch11: source_data_mappings_ucmfiles.mk.patch
 Patch12: source_data_misc_zoneinfo.txt.patch
-Patch13: source_i18n_regexcmp.cpp.patch
 Patch14: source_icudefs.mk.in.patch
 Patch15: source_io_Makefile.in.patch
 #Patch16: source_test_cintltst_udatatst.c.patch
@@ -114,7 +113,6 @@
 %patch10 -p1
 %patch11 -p1
 %patch12 -p1
-%patch13 -p1
 %patch14 -p1
 %patch15 -p1
 #%patch16 -p1
--- a/icu/patches/source_i18n_regexcmp.cpp.patch	Mon Nov 22 09:54:44 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
---- icu/source/i18n/regexcmp.cpp.orig	2009-05-04 15:57:01.469259031 +0800
-+++ icu/source/i18n/regexcmp.cpp	2009-05-04 15:58:16.388409011 +0800
-@@ -1264,14 +1264,17 @@
-             // Because capture groups can be forward-referenced by back-references,
-             //  we fill the operand with the capture group number.  At the end
-             //  of compilation, it will be changed to the variable's location.
--            U_ASSERT(groupNum > 0);
--            int32_t  op;
--            if (fModeFlags & UREGEX_CASE_INSENSITIVE) {
--                op = URX_BUILD(URX_BACKREF_I, groupNum);
-+            if (groupNum < 1) {
-+                error(U_REGEX_INVALID_BACK_REF);
-             } else {
--                op = URX_BUILD(URX_BACKREF, groupNum);
-+                int32_t  op;
-+                if (fModeFlags & UREGEX_CASE_INSENSITIVE) {
-+                    op = URX_BUILD(URX_BACKREF_I, groupNum);
-+                } else {
-+                    op = URX_BUILD(URX_BACKREF, groupNum);
-+                }
-+                fRXPat->fCompiledPat->addElement(op, *fStatus);
-             }
--            fRXPat->fCompiledPat->addElement(op, *fStatus);
-         }
-         break;
- 
--- a/icu/patches/source_test_intltest_regextst.cpp.patch	Mon Nov 22 09:54:44 2010 +0100
+++ b/icu/patches/source_test_intltest_regextst.cpp.patch	Mon Nov 22 09:54:44 2010 +0100
@@ -18,7 +18,7 @@
 +    //    For ICU 3.8 and earlier
 +    //    For ICU versions newer than 3.8, \0 introduces an octal escape.
 +    //
-+    REGEX_ERR("(ab)\\0", 1, 6, U_REGEX_INVALID_BACK_REF);
++    REGEX_ERR("(ab)\\0", 1, 6, U_REGEX_BAD_ESCAPE_SEQUENCE);
 +
  }
  
@@ -44,7 +44,7 @@
 +
 +    RegexMatcher  matcher(pattern, s, flags, status);
 +    UBool result = false;
-+    REGEX_ASSERT_FAIL(result=matcher.matches(status), U_BUFFER_OVERFLOW_ERROR);
++    REGEX_ASSERT_FAIL(result=matcher.matches(status), U_REGEX_STACK_OVERFLOW);
 +    REGEX_ASSERT(result == FALSE);
 + }
 +