external/hunspell: -fsanitize=shift
Change-Id: Ifc78a8f1a0a6fa29ef9becc5432e581f42241467
This commit is contained in:
@@ -14,6 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,hunspell,$(HUNSPELL_TARBALL)))
|
|||||||
$(eval $(call gb_UnpackedTarball_add_patches,hunspell,\
|
$(eval $(call gb_UnpackedTarball_add_patches,hunspell,\
|
||||||
external/hunspell/hunspell-solaris.patch \
|
external/hunspell/hunspell-solaris.patch \
|
||||||
external/hunspell/hunspell-windows.patch \
|
external/hunspell/hunspell-windows.patch \
|
||||||
|
external/hunspell/ubsan.patch.0 \
|
||||||
))
|
))
|
||||||
|
|
||||||
ifeq ($(COM),MSC)
|
ifeq ($(COM),MSC)
|
||||||
|
11
external/hunspell/ubsan.patch.0
vendored
Normal file
11
external/hunspell/ubsan.patch.0
vendored
Normal file
@@ -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,
|
Reference in New Issue
Block a user