summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2012-11-15 22:17:27 +0100
committerAlbert Astals Cid <aacid@kde.org>2012-11-15 22:17:27 +0100
commit15f600a5702788f7e5b91cd67bc2438179921939 (patch)
tree07761ffccf34560414d1fa6ed8663e610d62bd15
parentc7e3c2d7087e4fc36564ba7bd55e27e100e0a5e5 (diff)
Don't do a check for sanity that then we don't use
Fixes bugs 56753 and 51684
-rw-r--r--fofi/FoFiTrueType.cc26
1 files changed, 0 insertions, 26 deletions
diff --git a/fofi/FoFiTrueType.cc b/fofi/FoFiTrueType.cc
index e22cb63a..cd11d6ff 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();
}