Cherry pick 2 more patches from the upstream

They don't affect Chrome/Blink at the moment, but had better
be fixed now.

  http://www.icu-project.org/trac/ticket/12815
  http://www.icu-project.org/trac/ticket/12832

BUG=None

Review URL: https://codereview.chromium.org/2499493002 .
diff --git a/README.chromium b/README.chromium
index 8b69597..f39c426 100644
--- a/README.chromium
+++ b/README.chromium
@@ -258,11 +258,15 @@
 
    - patches/utf32.patch
 
-6. Fix two bugs found in 58.1 that will fixed in 58.1 maintenance release
+6. Fix four bugs found in 58.1 that will fixed in 58.1 maintenance release
 
    upstream bugs:
      http://www.icu-project.org/trac/ticket/12825 (scriptset)
+     http://www.icu-project.org/trac/ticket/12815 (uspoof)
      http://www.icu-project.org/trac/ticket/12822 (without std::string on Win)
+     http://www.icu-project.org/trac/ticket/12832 (greek_upper)
 
    - patches/scriptset.patch
+   - patches/uspoof.patch
    - patches/digilist.patch
+   - patches/greek_upper.patch
diff --git a/patches/greek_upper.patch b/patches/greek_upper.patch
new file mode 100644
index 0000000..e957d3e
--- /dev/null
+++ b/patches/greek_upper.patch
@@ -0,0 +1,13 @@
+Index: source/common/ucasemap.cpp
+===================================================================
+--- source/common/ucasemap.cpp	(revision 39499)
++++ source/common/ucasemap.cpp	(revision 39500)
+@@ -200,7 +200,7 @@
+         return -1;  // integer overflow
+     }
+     int32_t limit=destIndex+length;
+-    if(limit<destCapacity) {
++    if(limit<=destCapacity) {
+         U8_APPEND_UNSAFE(dest, destIndex, c);
+     }
+     return limit;
diff --git a/patches/uspoof.patch b/patches/uspoof.patch
new file mode 100644
index 0000000..0ab6597
--- /dev/null
+++ b/patches/uspoof.patch
@@ -0,0 +1,18 @@
+Index: source/i18n/uspoof.cpp
+===================================================================
+--- source/i18n/uspoof.cpp	(revision 39492)
++++ source/i18n/uspoof.cpp	(revision 39493)
+@@ -646,13 +646,6 @@
+         return dest;
+     }
+ 
+-    // Check that at least one of the CONFUSABLE flags is turned on.  If not,
+-    // return an error.
+-    if ((This->fChecks & USPOOF_CONFUSABLE) == 0) {
+-        *status = U_ILLEGAL_ARGUMENT_ERROR;
+-        return dest;
+-    }
+-
+     UnicodeString nfdId;
+     gNfdNormalizer->normalize(id, nfdId, *status);
+ 
diff --git a/source/common/ucasemap.cpp b/source/common/ucasemap.cpp
index c0d56c2..4d59f7d 100644
--- a/source/common/ucasemap.cpp
+++ b/source/common/ucasemap.cpp
@@ -200,7 +200,7 @@
         return -1;  // integer overflow
     }
     int32_t limit=destIndex+length;
-    if(limit<destCapacity) {
+    if(limit<=destCapacity) {
         U8_APPEND_UNSAFE(dest, destIndex, c);
     }
     return limit;
diff --git a/source/i18n/uspoof.cpp b/source/i18n/uspoof.cpp
index 9cb41e2..febaddc 100644
--- a/source/i18n/uspoof.cpp
+++ b/source/i18n/uspoof.cpp
@@ -646,13 +646,6 @@
         return dest;
     }
 
-    // Check that at least one of the CONFUSABLE flags is turned on.  If not,
-    // return an error.
-    if ((This->fChecks & USPOOF_CONFUSABLE) == 0) {
-        *status = U_ILLEGAL_ARGUMENT_ERROR;
-        return dest;
-    }
-
     UnicodeString nfdId;
     gNfdNormalizer->normalize(id, nfdId, *status);