diff options
Diffstat (limited to 'external/icu/icu-ubsan.patch.0')
-rw-r--r-- | external/icu/icu-ubsan.patch.0 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/external/icu/icu-ubsan.patch.0 b/external/icu/icu-ubsan.patch.0 new file mode 100644 index 000000000000..ef3121f88299 --- /dev/null +++ b/external/icu/icu-ubsan.patch.0 @@ -0,0 +1,20 @@ +--- source/common/ustring.cpp ++++ source/common/ustring.cpp +@@ -1486,7 +1486,7 @@ + */ + + #define STRING_HASH(TYPE, STR, STRLEN, DEREF) \ +- int32_t hash = 0; \ ++ uint32_t hash = 0; \ + const TYPE *p = (const TYPE*) STR; \ + if (p != NULL) { \ + int32_t len = (int32_t)(STRLEN); \ +@@ -1497,7 +1497,7 @@ + p += inc; \ + } \ + } \ +- return hash ++ return static_cast<int32_t>(hash) + + /* Used by UnicodeString to compute its hashcode - Not public API. */ + U_CAPI int32_t U_EXPORT2 |