summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-04-16 17:47:30 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-04-16 17:48:37 +0200
commit421c78e05fcb51e944f9829010bc79fd7d6ea76b (patch)
treee89a212a252aa47a184205f88345914164003a1e /external
parent7ec515a7162d886cba611067cc6b4577aaf270a4 (diff)
external/icu: Some trivial -fsanitize=undefined patches
Change-Id: I99c62b08b84d2d8afafd391257ab7b8b2d887fac
Diffstat (limited to 'external')
-rw-r--r--external/icu/UnpackedTarball_icu.mk1
-rw-r--r--external/icu/icu4c-ubsan.patch.022
2 files changed, 23 insertions, 0 deletions
diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk
index 77cd38a8bb1f..c550f83ff834 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -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:
diff --git a/external/icu/icu4c-ubsan.patch.0 b/external/icu/icu4c-ubsan.patch.0
new file mode 100644
index 000000000000..991c537acc0a
--- /dev/null
+++ b/external/icu/icu4c-ubsan.patch.0
@@ -0,0 +1,22 @@
+--- 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) {