Bug 1127935 - Check for null when trying to load 'head' table, to avoid crashing on non-sfnt fonts. r=jdaggett

This commit is contained in:
Jonathan Kew 2015-02-10 09:18:23 +00:00
parent 44bace9e64
commit ee276d8a7b

View File

@ -417,6 +417,9 @@ gfxHarfBuzzShaper::FindGlyf(hb_codepoint_t aGlyph, bool *aEmptyGlyf) const
uint32_t len;
gfxFontEntry::AutoTable headTable(entry,
TRUETYPE_TAG('h','e','a','d'));
if (!headTable) {
return nullptr;
}
const HeadTable* head =
reinterpret_cast<const HeadTable*>(hb_blob_get_data(headTable,
&len));