Ensure that the params parameter of the PredictorStream is a dictionary (issue 7200)

Fixes 7200.
This commit is contained in:
Jonas Jenwald 2016-04-15 14:22:36 +02:00
parent e9dbb233aa
commit 079b563e2d
4 changed files with 12 additions and 0 deletions

View File

@ -39,6 +39,7 @@ var createObjectURL = sharedUtil.createObjectURL;
var shadow = sharedUtil.shadow;
var warn = sharedUtil.warn;
var Dict = corePrimitives.Dict;
var isDict = corePrimitives.isDict;
var Jbig2Image = coreJbig2.Jbig2Image;
var JpegImage = coreJpg.JpegImage;
var JpxImage = coreJpx.JpxImage;
@ -680,6 +681,9 @@ var FlateStream = (function FlateStreamClosure() {
var PredictorStream = (function PredictorStreamClosure() {
function PredictorStream(str, maybeLength, params) {
if (!isDict(params)) {
return str; // no prediction
}
var predictor = this.predictor = params.get('Predictor') || 1;
if (predictor <= 1) {

View File

@ -23,6 +23,7 @@
!issue7020.pdf
!issue7101.pdf
!issue7115.pdf
!issue7200.pdf
!filled-background.pdf
!ArabicCIDTrueType.pdf
!ThuluthFeatures.pdf

BIN
test/pdfs/issue7200.pdf Normal file

Binary file not shown.

View File

@ -1270,6 +1270,13 @@
"rounds": 1,
"type": "eq"
},
{ "id": "issue7200",
"file": "pdfs/issue7200.pdf",
"md5": "ddae17424ea23930eecf8b612a66ed0f",
"link": false,
"rounds": 1,
"type": "eq"
},
{ "id": "pr4606",
"file": "pdfs/pr4606.pdf",
"md5": "6574fde2314648600056bd0e229df98c",