diff options
Diffstat (limited to 'vcl/source/fontsubset/sft.cxx')
-rw-r--r-- | vcl/source/fontsubset/sft.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index 0e0978b779c0..d97be8071272 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -1693,7 +1693,8 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t ) } const sal_uInt8* table = getTable(t, O_maxp); - t->nglyphs = GetUInt16(table, 4, 1); + sal_uInt32 table_size = getTableSize(t, O_maxp); + t->nglyphs = table_size >= 6 ? GetUInt16(table, 4, 1) : 0; table = getTable(t, O_head); t->unitsPerEm = GetUInt16(table, 18, 1); |