summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2018-10-15 19:46:45 -0700
committerBehdad Esfahbod <behdad@behdad.org>2018-10-15 19:46:45 -0700
commit4c27da7638f6d072c3ff93223488c4ab316236c1 (patch)
tree6322691284ac8cc7703e6dc83dc3ef81441ea99e
parent0f85edb7781f4d5ec2de676979be75a0f6559d80 (diff)
[CBDT] Fix more offsetting
Fixes https://oss-fuzz.com/v2/testcase-detail/5750379279548416
-rw-r--r--src/hb-ot-color-cbdt-table.hh7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/hb-ot-color-cbdt-table.hh b/src/hb-ot-color-cbdt-table.hh
index 30459684..1e1fe095 100644
--- a/src/hb-ot-color-cbdt-table.hh
+++ b/src/hb-ot-color-cbdt-table.hh
@@ -209,9 +209,10 @@ struct IndexSubtableRecord
offsetToSubtable.sanitize (c, base, lastGlyphIndex - firstGlyphIndex + 1));
}
- inline bool get_extents (hb_glyph_extents_t *extents) const
+ inline bool get_extents (hb_glyph_extents_t *extents,
+ const void *base) const
{
- return (this+offsetToSubtable).get_extents (extents);
+ return (base+offsetToSubtable).get_extents (extents);
}
bool get_image_data (unsigned int gid,
@@ -420,7 +421,7 @@ struct CBDT
if (!subtable_record || !x_ppem || !y_ppem)
return false;
- if (subtable_record->get_extents (extents))
+ if (subtable_record->get_extents (extents, base))
return true;
unsigned int image_offset = 0, image_length = 0, image_format = 0;