From 56dc9f6484985dd16274709c61d2ef640381dabd Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 12 Jan 2015 10:32:59 +0100 Subject: external/hunspell: Work around -fsanitize=shift Change-Id: Id93e61a1b9893ae026056a9d3e03c88b259f0ff8 --- external/hunspell/UnpackedTarball_hunspell.mk | 1 + external/hunspell/ubsan.patch.0 | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 external/hunspell/ubsan.patch.0 (limited to 'external') diff --git a/external/hunspell/UnpackedTarball_hunspell.mk b/external/hunspell/UnpackedTarball_hunspell.mk index 9acfd9576d2f..ecf785601b84 100644 --- a/external/hunspell/UnpackedTarball_hunspell.mk +++ b/external/hunspell/UnpackedTarball_hunspell.mk @@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,hunspell,\ external/hunspell/hunspell-1.3.2-literal.patch \ external/hunspell/hunspell-fdo48017-wfopen.patch \ external/hunspell/hunspell-morph-overflow.patch \ + external/hunspell/ubsan.patch.0 \ )) ifeq ($(COM),MSC) diff --git a/external/hunspell/ubsan.patch.0 b/external/hunspell/ubsan.patch.0 new file mode 100644 index 000000000000..8749cd91e645 --- /dev/null +++ b/external/hunspell/ubsan.patch.0 @@ -0,0 +1,11 @@ +--- src/hunspell/hashmgr.cxx ++++ src/hunspell/hashmgr.cxx +@@ -479,7 +479,7 @@ + + int HashMgr::hash(const char * word) const + { +- long hv = 0; ++ unsigned long hv = 0; + for (int i=0; i < 4 && *word != 0; i++) + hv = (hv << 8) | (*word++); + while (*word != 0) { -- cgit