summaryrefslogtreecommitdiff
path: root/fofi
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2018-09-23 22:35:32 +0200
committerAlbert Astals Cid <aacid@kde.org>2018-09-23 22:35:32 +0200
commit2ea24b168ab196237093b49cbc24427b023aa79b (patch)
tree2dfa68ef3cd01a732d75b2ef5d303551cd6b75e5 /fofi
parent8ca7c4f2bbce1e22393cb2e71ae9025b72289121 (diff)
FoFiType1C::getIndexVal: Don't calculate val if it's not ok
No need to do extra work if we're saying it won't be used Fixes oss-fuzz/10632
Diffstat (limited to 'fofi')
-rw-r--r--fofi/FoFiType1C.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/fofi/FoFiType1C.cc b/fofi/FoFiType1C.cc
index d6a241d1..d70c80b5 100644
--- a/fofi/FoFiType1C.cc
+++ b/fofi/FoFiType1C.cc
@@ -2742,6 +2742,7 @@ void FoFiType1C::getIndexVal(const Type1CIndex *idx, int i,
pos1 <= idx->startPos || pos1 > idx->endPos ||
pos1 < pos0) {
*ok = gFalse;
+ return;
}
val->pos = pos0;
val->len = pos1 - pos0;