Diffstat (limited to 'noncore/unsupported/qpdf/xpdf/Function.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/qpdf/xpdf/Function.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/noncore/unsupported/qpdf/xpdf/Function.cc b/noncore/unsupported/qpdf/xpdf/Function.cc index 815cc89..ebf3718 100644 --- a/noncore/unsupported/qpdf/xpdf/Function.cc +++ b/noncore/unsupported/qpdf/xpdf/Function.cc | |||
@@ -4,3 +4,3 @@ | |||
4 | // | 4 | // |
5 | // Copyright 2001 Derek B. Noonburg | 5 | // Copyright 2001-2002 Glyph & Cog, LLC |
6 | // | 6 | // |
@@ -417,3 +417,2 @@ ExponentialFunction::ExponentialFunction(Object *funcObj, Dict *dict) { | |||
417 | ok = gFalse; | 417 | ok = gFalse; |
418 | hasN = gFalse; | ||
419 | 418 | ||
@@ -427,2 +426,3 @@ ExponentialFunction::ExponentialFunction(Object *funcObj, Dict *dict) { | |||
427 | } | 426 | } |
427 | hasN = hasRange; | ||
428 | 428 | ||
@@ -438,2 +438,3 @@ ExponentialFunction::ExponentialFunction(Object *funcObj, Dict *dict) { | |||
438 | n = obj1.arrayGetLength(); | 438 | n = obj1.arrayGetLength(); |
439 | hasN = gTrue; | ||
439 | } else if (obj1.arrayGetLength() != n) { | 440 | } else if (obj1.arrayGetLength() != n) { |
@@ -458,2 +459,3 @@ ExponentialFunction::ExponentialFunction(Object *funcObj, Dict *dict) { | |||
458 | n = obj1.arrayGetLength(); | 459 | n = obj1.arrayGetLength(); |
460 | hasN = gTrue; | ||
459 | } else if (obj1.arrayGetLength() != n) { | 461 | } else if (obj1.arrayGetLength() != n) { |
@@ -482,2 +484,9 @@ ExponentialFunction::ExponentialFunction(Object *funcObj, Dict *dict) { | |||
482 | 484 | ||
485 | // this isn't supposed to happen, but I've run into (broken) PDF | ||
486 | // files where it does | ||
487 | if (!hasN) { | ||
488 | error(-1, "Exponential function does not define number of output values"); | ||
489 | n = 1; | ||
490 | } | ||
491 | |||
483 | ok = gTrue; | 492 | ok = gTrue; |