From 84865af13a6999ef5bca7f0e35ec455270ad25cc Mon Sep 17 00:00:00 2001 From: prr Date: Wed, 25 Mar 2020 16:26:21 -0700 Subject: [PATCH] 8238843: Enhanced font handing Reviewed-by: serb, psadhukhan, mschoene, rhalade --- src/share/classes/sun/font/TrueTypeFont.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/share/classes/sun/font/TrueTypeFont.java b/src/share/classes/sun/font/TrueTypeFont.java index 544f78d20..5ee84d932 100644 --- a/src/share/classes/sun/font/TrueTypeFont.java +++ b/src/share/classes/sun/font/TrueTypeFont.java @@ -570,8 +570,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); } -- GitLab