]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/tools/gennorm2/gennorm2.cpp
ICU-66108.tar.gz
[apple/icu.git] / icuSources / tools / gennorm2 / gennorm2.cpp
index 2d24d61071ba8135bace7879ee324044e5c3292d..bce5336be628c4a7b2242a2ad937a09135b3c6d1 100644 (file)
@@ -266,6 +266,11 @@ void parseFile(std::ifstream &f, Normalizer2DataBuilder &builder) {
             fprintf(stderr, "gennorm2 error: parsing code point range from %s\n", line);
             exit(errorCode.reset());
         }
+        if (endCP >= 0xd800 && startCP <= 0xdfff) {
+                fprintf(stderr, "gennorm2 error: value or mapping for surrogate code points: %s\n",
+                        line);
+                exit(U_ILLEGAL_ARGUMENT_ERROR);
+        }
         delimiter=u_skipWhitespace(delimiter);
         if(*delimiter==':') {
             const char *s=u_skipWhitespace(delimiter+1);