summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2017-09-14 19:14:41 +0200
committerAlbert Astals Cid <aacid@kde.org>2017-09-14 19:14:41 +0200
commitda63c35549e8852a410946ab016a3f25ac701bdf (patch)
tree4f4703b1717c193af020f6af5d2469b7d921b821
parent504b3590182175390f474657a372e78fb1508262 (diff)
FoFiType1C::convertToType0: Fix crash in broken files
Bug #102724
-rw-r--r--fofi/FoFiType1C.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/fofi/FoFiType1C.cc b/fofi/FoFiType1C.cc
index 7a827855..7c9494f5 100644
--- a/fofi/FoFiType1C.cc
+++ b/fofi/FoFiType1C.cc
@@ -898,6 +898,9 @@ void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes,
}
}
+ if (fd >= nFDs)
+ continue;
+
// font dictionary (unencrypted section)
(*outputFunc)(outputStream, "16 dict begin\n", 14);
(*outputFunc)(outputStream, "/FontName /", 11);