summaryrefslogtreecommitdiff
path: root/fofi
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2018-05-25 19:38:19 +0200
committerAlbert Astals Cid <aacid@kde.org>2018-05-25 19:38:19 +0200
commit97caec070090d112d4fb5b63dc433a34e214c7e5 (patch)
tree761a0a6dacdccd3928bdc4e5096bb1211209e10c /fofi
parent7e2189377bfaa0594e25eaba26aca47bea59f315 (diff)
FoFiType1C::readTopDict: Return early if parsing fails
fixes oss-fuzz/8456
Diffstat (limited to 'fofi')
-rw-r--r--fofi/FoFiType1C.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/fofi/FoFiType1C.cc b/fofi/FoFiType1C.cc
index b14561ff..37694869 100644
--- a/fofi/FoFiType1C.cc
+++ b/fofi/FoFiType1C.cc
@@ -2126,6 +2126,9 @@ void FoFiType1C::readTopDict() {
topDict.fdSelectOffset = 0;
getIndexVal(&topDictIdx, 0, &topDictPtr, &parsedOk);
+ if (!parsedOk) {
+ return;
+ }
pos = topDictPtr.pos;
nOps = 0;
while (pos < topDictPtr.pos + topDictPtr.len) {