[sbix] Rely on blob->as<> checking size against Type::min_size
This commit is contained in:
parent
4d4e526b5c
commit
995bf6c6f8
|
@ -243,12 +243,6 @@ struct sbix
|
||||||
unsigned int strike_ppem = 0;
|
unsigned int strike_ppem = 0;
|
||||||
hb_blob_t *blob = reference_png (font, glyph, &x_offset, &y_offset, &strike_ppem);
|
hb_blob_t *blob = reference_png (font, glyph, &x_offset, &y_offset, &strike_ppem);
|
||||||
|
|
||||||
if (unlikely (blob->length < sizeof (PNGHeader)))
|
|
||||||
{
|
|
||||||
hb_blob_destroy (blob);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const PNGHeader &png = *blob->as<PNGHeader>();
|
const PNGHeader &png = *blob->as<PNGHeader>();
|
||||||
|
|
||||||
extents->x_bearing = x_offset;
|
extents->x_bearing = x_offset;
|
||||||
|
|
Loading…
Reference in New Issue