diff options
Diffstat (limited to 'Build/source/libs/icu/icu-src/source/i18n/regexcmp.cpp')
-rw-r--r-- | Build/source/libs/icu/icu-src/source/i18n/regexcmp.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Build/source/libs/icu/icu-src/source/i18n/regexcmp.cpp b/Build/source/libs/icu/icu-src/source/i18n/regexcmp.cpp index be8323371a9..2657cf37cbe 100644 --- a/Build/source/libs/icu/icu-src/source/i18n/regexcmp.cpp +++ b/Build/source/libs/icu/icu-src/source/i18n/regexcmp.cpp @@ -1,3 +1,5 @@ +// Copyright (C) 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html // // file: regexcmp.cpp // @@ -2603,7 +2605,11 @@ void RegexCompile::findCaseInsensitiveStarters(UChar32 c, UnicodeSet *starterCh // End of machine generated data. - if (u_hasBinaryProperty(c, UCHAR_CASE_SENSITIVE)) { + if (c < UCHAR_MIN_VALUE || c > UCHAR_MAX_VALUE) { + // This function should never be called with an invalid input character. + U_ASSERT(FALSE); + starterChars->clear(); + } else if (u_hasBinaryProperty(c, UCHAR_CASE_SENSITIVE)) { UChar32 caseFoldedC = u_foldCase(c, U_FOLD_CASE_DEFAULT); starterChars->set(caseFoldedC, caseFoldedC); |