Skip to content

Commit

Permalink
8238843: Enhanced font handing
Browse files Browse the repository at this point in the history
Reviewed-by: serb, psadhukhan, mschoene, rhalade
  • Loading branch information
prrace committed Mar 25, 2020
1 parent 45258a1 commit e3673d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/java.desktop/share/classes/sun/font/TrueTypeFont.java
Expand Up @@ -503,8 +503,8 @@ protected void init(int fIndex) throws FontFormatException {
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);
}
Expand Down

0 comments on commit e3673d4

Please sign in to comment.