summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2015-12-22 22:50:33 +0100
committerAlbert Astals Cid <aacid@kde.org>2015-12-22 22:52:05 +0100
commitb3425dd3261679958cd56c0f71995c15d2124433 (patch)
tree8799cf1869f080c974ab6f8c6b92ea185b9161f3
parent5d57c34cbf9288eec6ddb149e905268405c19450 (diff)
Do not crash on invalid files
Bug #93476
-rw-r--r--poppler/Function.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/poppler/Function.cc b/poppler/Function.cc
index 67283dff..ee5afc14 100644
--- a/poppler/Function.cc
+++ b/poppler/Function.cc
@@ -577,6 +577,10 @@ ExponentialFunction::ExponentialFunction(Object *funcObj, Dict *dict) {
goto err2;
}
n = obj1.arrayGetLength();
+ if (unlikely(n > funcMaxOutputs)) {
+ error(errSyntaxError, -1, "Function's C0 array is wrong length");
+ n = funcMaxOutputs;
+ }
for (i = 0; i < n; ++i) {
obj1.arrayGet(i, &obj2);
if (!obj2.isNum()) {