external/harfbuzz/UnpackedTarball_harfbuzz.mk | 1 + external/harfbuzz/ubsan.patch | 11 +++++++++++ 2 files changed, 12 insertions(+)
New commits: commit 0ea5c91253926181488a1da61a31d49d50ed09d1 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Nov 13 19:03:18 2017 +0100 Resurrect still relevant part of external/harfbuzz/ubsan.patch ...after 945c10f42fe6d22031e7424b47481ac2cfb539be "upload harfbuzz 1.6.3" had dropped it completely. Still necessary to e.g. avoid "runtime error: index 3 out of bounds for type 'OT::LongMetric const[1]'" during CppunitTest_emfio_wmf. Change-Id: Idd93f6224f7e43016a71678bcaf5cc0527f95cee diff --git a/external/harfbuzz/UnpackedTarball_harfbuzz.mk b/external/harfbuzz/UnpackedTarball_harfbuzz.mk index 8ec1c8d3ab23..74c990c0c1aa 100644 --- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk +++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk @@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,harfbuzz,0)) $(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \ external/harfbuzz/clang-cl.patch \ + external/harfbuzz/ubsan.patch \ )) ifneq ($(ENABLE_RUNTIME_OPTIMIZATIONS),TRUE) diff --git a/external/harfbuzz/ubsan.patch b/external/harfbuzz/ubsan.patch new file mode 100644 index 000000000000..c5f923448c8e --- /dev/null +++ b/external/harfbuzz/ubsan.patch @@ -0,0 +1,11 @@ +--- src/hb-ot-font.cc ++++ src/hb-ot-font.cc +@@ -138,7 +138,7 @@ + return this->default_advance; + } + +- return this->table->longMetric[MIN (glyph, (uint32_t) this->num_advances - 1)].advance ++ return static_cast<OT::LongMetric const *>(this->table->longMetric)[MIN (glyph, (uint32_t) this->num_advances - 1)].advance + + this->var->get_advance_var (glyph, font->coords, font->num_coords); // TODO Optimize?! + } + }; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits