Kaydet (Commit) 421c78e0 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

external/icu: Some trivial -fsanitize=undefined patches

Change-Id: I99c62b08b84d2d8afafd391257ab7b8b2d887fac
üst 7ec515a7
......@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-mkdir.patch \
external/icu/icu4c-buffer-overflow.patch \
external/icu/icu4c-$(if $(filter ANDROID,$(OS)),android,rpath).patch \
external/icu/icu4c-ubsan.patch.0 \
))
# vim: set noet sw=4 ts=4:
--- 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); \
--- source/i18n/ucol_tok.cpp
+++ source/i18n/ucol_tok.cpp
@@ -48,7 +48,7 @@
static int32_t U_CALLCONV
uhash_hashTokens(const UHashTok k)
{
- int32_t hash = 0;
+ uint32_t hash = 0;
//uint32_t key = (uint32_t)k.integer;
UColToken *key = (UColToken *)k.pointer;
if (key != 0) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment