summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-ankr-table.hh
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-01-31 23:16:40 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-01-31 23:16:40 +0000
commit2cd8b0fe12bfff91766553466c373294ad80e2d9 (patch)
treeb63bdcc28ac89c7a54dd25dba31b18ea6eca1aca /Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-ankr-table.hh
parent19697bbcefd2b6c4339efb559af609f1b9da8c9d (diff)
harfbuzz 2.3.1
git-svn-id: svn://tug.org/texlive/trunk@49891 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-ankr-table.hh')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-ankr-table.hh18
1 files changed, 7 insertions, 11 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-ankr-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-ankr-table.hh
index 4235b363a1f..236e4aaf1e3 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-ankr-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-ankr-table.hh
@@ -58,20 +58,16 @@ typedef LArrayOf<Anchor> GlyphAnchors;
struct ankr
{
- enum { tableTag = HB_AAT_TAG_ankr };
+ static constexpr hb_tag_t tableTag = HB_AAT_TAG_ankr;
const Anchor &get_anchor (hb_codepoint_t glyph_id,
unsigned int i,
- unsigned int num_glyphs,
- const char *end) const
+ unsigned int num_glyphs) const
{
- const Offset<HBUINT16, false> *offset = (this+lookupTable).get_value (glyph_id, num_glyphs);
+ const NNOffsetTo<GlyphAnchors> *offset = (this+lookupTable).get_value (glyph_id, num_glyphs);
if (!offset)
return Null(Anchor);
- const GlyphAnchors &anchors = StructAtOffset<GlyphAnchors> (&(this+anchorData), *offset);
- /* TODO Use sanitizer; to avoid overflows and more. */
- if (unlikely ((const char *) &anchors + anchors.get_size () > end))
- return Null(Anchor);
+ const GlyphAnchors &anchors = &(this+anchorData) + *offset;
return anchors[i];
}
@@ -80,15 +76,15 @@ struct ankr
TRACE_SANITIZE (this);
return_trace (likely (c->check_struct (this) &&
version == 0 &&
- lookupTable.sanitize (c, this)));
+ lookupTable.sanitize (c, this, &(this+anchorData))));
}
protected:
HBUINT16 version; /* Version number (set to zero) */
HBUINT16 flags; /* Flags (currently unused; set to zero) */
- LOffsetTo<Lookup<Offset<HBUINT16, false> >, false>
+ LOffsetTo<Lookup<NNOffsetTo<GlyphAnchors> > >
lookupTable; /* Offset to the table's lookup table */
- LOffsetTo<HBUINT8, false>
+ LNNOffsetTo<HBUINT8>
anchorData; /* Offset to the glyph data table */
public: