[poppler] fofi/FoFiTrueType.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Thu Nov 15 13:18:25 PST 2012


 fofi/FoFiTrueType.cc |   26 --------------------------
 1 file changed, 26 deletions(-)

New commits:
commit 15f600a5702788f7e5b91cd67bc2438179921939
Author: Albert Astals Cid <aacid at kde.org>
Date:   Thu Nov 15 22:17:27 2012 +0100

    Don't do a check for sanity that then we don't use
    
    Fixes bugs 56753 and 51684

diff --git a/fofi/FoFiTrueType.cc b/fofi/FoFiTrueType.cc
index e22cb63..cd11d6f 100644
--- a/fofi/FoFiTrueType.cc
+++ b/fofi/FoFiTrueType.cc
@@ -1415,32 +1415,6 @@ void FoFiTrueType::parse() {
     return;
   }
 
-  // make sure the loca table is sane (correct length and entries are
-  // in bounds)
-  if (!openTypeCFF) {
-    i = seekTable("loca");
-    if (tables[i].len < 0) {
-      parsedOk = gFalse;
-      return;
-    }
-    if (tables[i].len < (nGlyphs + 1) * (locaFmt ? 4 : 2)) {
-      nGlyphs = tables[i].len / (locaFmt ? 4 : 2) - 1;
-    }
-    for (j = 0; j <= nGlyphs; ++j) {
-      if (locaFmt) {
-	pos = (int)getU32BE(tables[i].offset + j*4, &parsedOk);
-      } else {
-	pos = getU16BE(tables[i].offset + j*2, &parsedOk);
-      }
-      if (pos < 0 || pos > len) {
-	parsedOk = gFalse;
-      }
-    }
-    if (!parsedOk) {
-      return;
-    }
-  }
-
   // read the post table
   readPostTable();
 }


More information about the poppler mailing list