Skip to content

Commit 5415276

Browse files
committed
XeTeXFontInst: fix null-deref on invalid font file
1 parent 6b6df36 commit 5415276

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/xetex_layout/layout/xetex-XeTeXFontInst.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ XeTeXFontInst::initialize(const char* pathname, int index, int &status)
333333

334334
error = FT_New_Memory_Face(gFreeTypeLibrary, m_backingData, sz, index, &m_ftFace);
335335

336-
if (!FT_IS_SCALABLE(m_ftFace)) {
336+
if (error || !FT_IS_SCALABLE(m_ftFace)) {
337337
status = 1;
338338
return;
339339
}

0 commit comments

Comments
 (0)