summaryrefslogtreecommitdiff
path: root/external/harfbuzz
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-17 10:02:05 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-17 10:02:05 +0100
commit2793e0e2fc4b7766ed1b8e4f46fcfe8116802e72 (patch)
treefc373aeda831764fa8d6b063182247be2277dbc8 /external/harfbuzz
parent61adec681004531bb2ffa86f21249bacc09ecec3 (diff)
Adapt external/harfbuzz/ubsan.patch
...to 3b773d5b41628c1ccf52bdd0d7962183d54c4138 "Upload HarfBuzz 1.7.4" Change-Id: I07459c9e03a4cd68a600150964a4e5358b559766
Diffstat (limited to 'external/harfbuzz')
-rw-r--r--external/harfbuzz/UnpackedTarball_harfbuzz.mk1
-rw-r--r--external/harfbuzz/ubsan.patch18
2 files changed, 10 insertions, 9 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
index c5f923448c8e..c2247ef84d3e 100644
--- a/external/harfbuzz/ubsan.patch
+++ b/external/harfbuzz/ubsan.patch
@@ -1,11 +1,11 @@
---- src/hb-ot-font.cc
-+++ src/hb-ot-font.cc
-@@ -138,7 +138,7 @@
- return this->default_advance;
+--- src/hb-ot-hmtx-table.hh
++++ src/hb-ot-hmtx-table.hh
+@@ -143,7 +143,7 @@
+ return default_advance;
+ }
+
+- return table->longMetric[MIN (glyph, (uint32_t) num_advances - 1)].advance
++ return static_cast<OT::LongMetric const *>(table->longMetric)[MIN (glyph, (uint32_t) num_advances - 1)].advance
+ + var_table->get_advance_var (glyph, font->coords, font->num_coords); // TODO Optimize?!
}
-- 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?!
- }
- };