diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2023-05-03 14:49:00 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-05-04 10:26:09 +0000 |
commit | 2fdc4db757ab81aa36ffd2f2458980917da8181e (patch) | |
tree | dd24bafa72757710096ccd290ac1f45b5bc787de /src/3rdparty/harfbuzz-ng/src/OT/glyf/SimpleGlyph.hh | |
parent | 50d4e338cf11e83e9d8bb1e0254da60cc528a666 (diff) | |
download | qtbase-2fdc4db757ab81aa36ffd2f2458980917da8181e.tar.gz |
Update harfbuzz to version 7.2.0
Fixes: QTBUG-113352
Change-Id: I134f5b49c2ae5bef31edfc5cd87f0ff62d6c18b1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 151287fb5182b45736da6b2e2e516bb54e44219a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/OT/glyf/SimpleGlyph.hh')
-rw-r--r-- | src/3rdparty/harfbuzz-ng/src/OT/glyf/SimpleGlyph.hh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/OT/glyf/SimpleGlyph.hh b/src/3rdparty/harfbuzz-ng/src/OT/glyf/SimpleGlyph.hh index b6fefce1ac..b6679b2dae 100644 --- a/src/3rdparty/harfbuzz-ng/src/OT/glyf/SimpleGlyph.hh +++ b/src/3rdparty/harfbuzz-ng/src/OT/glyf/SimpleGlyph.hh @@ -34,6 +34,11 @@ struct SimpleGlyph unsigned int length (unsigned int instruction_len) const { return instruction_len_offset () + 2 + instruction_len; } + bool has_instructions_length () const + { + return instruction_len_offset () + 2 <= bytes.length; + } + unsigned int instructions_length () const { unsigned int instruction_length_offset = instruction_len_offset (); @@ -94,6 +99,7 @@ struct SimpleGlyph /* zero instruction length */ void drop_hints () { + if (!has_instructions_length ()) return; GlyphHeader &glyph_header = const_cast<GlyphHeader &> (header); (HBUINT16 &) StructAtOffset<HBUINT16> (&glyph_header, instruction_len_offset ()) = 0; } |