[Libreoffice-commits] core.git: external/hunspell
Stephan Bergmann
sbergman at redhat.com
Thu Apr 7 09:09:22 UTC 2016
external/hunspell/UnpackedTarball_hunspell.mk | 1 +
external/hunspell/ubsan.patch.0 | 11 +++++++++++
2 files changed, 12 insertions(+)
New commits:
commit 16048590bb486ffa3b0a257c31390dc500f7360a
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Apr 7 11:08:55 2016 +0200
external/hunspell: -fsanitize=shift
Change-Id: Ifc78a8f1a0a6fa29ef9becc5432e581f42241467
diff --git a/external/hunspell/UnpackedTarball_hunspell.mk b/external/hunspell/UnpackedTarball_hunspell.mk
index e70e33f..7ce4aea 100644
--- a/external/hunspell/UnpackedTarball_hunspell.mk
+++ b/external/hunspell/UnpackedTarball_hunspell.mk
@@ -14,6 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,hunspell,$(HUNSPELL_TARBALL)))
$(eval $(call gb_UnpackedTarball_add_patches,hunspell,\
external/hunspell/hunspell-solaris.patch \
external/hunspell/hunspell-windows.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..af25d6a
--- /dev/null
+++ b/external/hunspell/ubsan.patch.0
@@ -0,0 +1,11 @@
+--- src/hunspell/csutil.cxx
++++ src/hunspell/csutil.cxx
+@@ -281,7 +281,7 @@
+ u2->h = ((*u8 & 0x0f) << 4) + ((*(u8 + 1) & 0x3f) >> 2);
+ u8++;
+ if ((*(u8 + 1) & 0xc0) == 0x80) {
+- u2->l = (*u8 << 6) + (*(u8 + 1) & 0x3f);
++ u2->l = (static_cast<unsigned char>(*u8) << 6) + (*(u8 + 1) & 0x3f);
+ u8++;
+ } else {
+ HUNSPELL_WARNING(stderr,
More information about the Libreoffice-commits
mailing list