[Libreoffice-commits] core.git: external/hunspell

Stephan Bergmann sbergman at redhat.com
Mon Jan 12 01:33:43 PST 2015


 external/hunspell/UnpackedTarball_hunspell.mk |    1 +
 external/hunspell/ubsan.patch.0               |   11 +++++++++++
 2 files changed, 12 insertions(+)

New commits:
commit 56dc9f6484985dd16274709c61d2ef640381dabd
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 12 10:32:59 2015 +0100

    external/hunspell: Work around -fsanitize=shift
    
    Change-Id: Id93e61a1b9893ae026056a9d3e03c88b259f0ff8

diff --git a/external/hunspell/UnpackedTarball_hunspell.mk b/external/hunspell/UnpackedTarball_hunspell.mk
index 9acfd95..ecf7856 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 0000000..8749cd9
--- /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) {


More information about the Libreoffice-commits mailing list