8238843: Enhanced font handing

Reviewed-by: serb, psadhukhan, mschoene, rhalade
This commit is contained in:
Phil Race 2020-03-25 16:26:21 -07:00
parent 45258a1799
commit e3673d4677

View File

@ -503,8 +503,8 @@ public class TrueTypeFont extends FileFont {
tableDirectory[i] = table = new DirectoryEntry();
table.tag = ibuffer.get();
/* checksum */ ibuffer.get();
table.offset = ibuffer.get();
table.length = ibuffer.get();
table.offset = ibuffer.get() & 0x7FFFFFFF;
table.length = ibuffer.get() & 0x7FFFFFFF;
if (table.offset + table.length > fileSize) {
throw new FontFormatException("bad table, tag="+table.tag);
}