diff options
Diffstat (limited to 'libicuuc/libicu/unistr.cpp.patch')
-rw-r--r-- | libicuuc/libicu/unistr.cpp.patch | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libicuuc/libicu/unistr.cpp.patch b/libicuuc/libicu/unistr.cpp.patch new file mode 100644 index 0000000..485f94c --- /dev/null +++ b/libicuuc/libicu/unistr.cpp.patch @@ -0,0 +1,15 @@ +--- libicu/uc/unistr.cpp 2019-12-23 14:38:39.792890424 +0300 ++++ libicu/unistr.cpp 2020-04-07 21:15:55.107326955 +0300 +@@ -1563,7 +1563,11 @@ UnicodeString::doAppend(const UChar *src + } + + int32_t oldLength = length(); +- int32_t newLength = oldLength + srcLength; ++ int32_t newLength; ++ if (uprv_add32_overflow(oldLength, srcLength, &newLength)) { ++ setToBogus(); ++ return *this; ++ } + + // Check for append onto ourself + const UChar* oldArray = getArrayStart(); |