diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-04-07 11:08:55 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-04-07 11:08:55 +0200 |
commit | 16048590bb486ffa3b0a257c31390dc500f7360a (patch) | |
tree | 415cdb3085d7b78a794808949778e2f95386d3ac /external | |
parent | 082005bf81b1c72da042193449974bbb610ca85f (diff) |
external/hunspell: -fsanitize=shift
Change-Id: Ifc78a8f1a0a6fa29ef9becc5432e581f42241467
Diffstat (limited to 'external')
-rw-r--r-- | external/hunspell/UnpackedTarball_hunspell.mk | 1 | ||||
-rw-r--r-- | external/hunspell/ubsan.patch.0 | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/external/hunspell/UnpackedTarball_hunspell.mk b/external/hunspell/UnpackedTarball_hunspell.mk index e70e33f37911..7ce4aea1435a 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 000000000000..af25d6a9c4b2 --- /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, |