summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2014-04-06 15:28:50 +0200
committerAlbert Astals Cid <aacid@kde.org>2014-04-06 16:08:14 +0200
commita511005584a38217fed582ced6ce2c937526cf96 (patch)
tree315f1e9c0fef9d8b9e4c4535b6acf47c93763810
parent26b961a64030d91c5db2769dcd0ab8dff7b9b6a6 (diff)
Fix Uninitialized pointer read when nFucnsA is 0
CID #16965
-rw-r--r--poppler/GfxState.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index addba686..eb11777c 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -3720,7 +3720,7 @@ GfxFunctionShading *GfxFunctionShading::parse(Dict *dict, OutputDev *out, GfxSta
dict->lookup("Function", &obj1);
if (obj1.isArray()) {
nFuncsA = obj1.arrayGetLength();
- if (nFuncsA > gfxColorMaxComps) {
+ if (nFuncsA > gfxColorMaxComps || nFuncsA <= 0) {
error(errSyntaxWarning, -1, "Invalid Function array in shading dictionary");
goto err1;
}