summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-12 10:32:59 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-12 10:32:59 +0100
commit56dc9f6484985dd16274709c61d2ef640381dabd (patch)
tree37fb7f8a272b06ac4c06f1d35bf87b77f7a3a8fa /external
parent0042de4cf8ca02dd0fe9063266b69943d97b645b (diff)
external/hunspell: Work around -fsanitize=shift
Change-Id: Id93e61a1b9893ae026056a9d3e03c88b259f0ff8
Diffstat (limited to 'external')
-rw-r--r--external/hunspell/UnpackedTarball_hunspell.mk1
-rw-r--r--external/hunspell/ubsan.patch.011
2 files changed, 12 insertions, 0 deletions
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) {