[sbix] Fix memory leak in early return

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11210
This commit is contained in:
Khaled Hosny 2018-10-30 17:05:28 +02:00
parent edaa768253
commit 0af3d176a6
2 changed files with 3 additions and 0 deletions

View File

@ -244,7 +244,10 @@ struct sbix
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>();