diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-11-13 19:03:18 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-11-13 19:03:18 +0100 |
commit | 0ea5c91253926181488a1da61a31d49d50ed09d1 (patch) | |
tree | 304b99fdcd27a3317eaffdb313c1a19b77ea5aa4 /external | |
parent | 249c5b293113e2cea838695b21ceeb179a56e2a6 (diff) |
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
Diffstat (limited to 'external')
-rw-r--r-- | external/harfbuzz/UnpackedTarball_harfbuzz.mk | 1 | ||||
-rw-r--r-- | external/harfbuzz/ubsan.patch | 11 |
2 files changed, 12 insertions, 0 deletions
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?! + } + }; |