Merge pull request #11047 from Snuffleupagus/issue-11045
Support corrupt PDF files with invalid/non-existent Group /CS entries (issue 11045)
This commit is contained in:
commit
bb5e98195d
@ -263,8 +263,14 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
groupOptions.isolated = (group.get('I') || false);
|
||||
groupOptions.knockout = (group.get('K') || false);
|
||||
if (group.has('CS')) {
|
||||
colorSpace = ColorSpace.parse(group.get('CS'), this.xref, resources,
|
||||
this.pdfFunctionFactory);
|
||||
colorSpace = group.get('CS');
|
||||
if (colorSpace) {
|
||||
colorSpace = ColorSpace.parse(colorSpace, this.xref, resources,
|
||||
this.pdfFunctionFactory);
|
||||
} else {
|
||||
warn('buildFormXObject - invalid/non-existent Group /CS entry: ' +
|
||||
group.getRaw('CS'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -80,6 +80,7 @@
|
||||
!issue10542_reduced.pdf
|
||||
!issue10665_reduced.pdf
|
||||
!issue11016_reduced.pdf
|
||||
!issue11045.pdf
|
||||
!bad-PageLabels.pdf
|
||||
!decodeACSuccessive.pdf
|
||||
!filled-background.pdf
|
||||
|
BIN
test/pdfs/issue11045.pdf
Normal file
BIN
test/pdfs/issue11045.pdf
Normal file
Binary file not shown.
@ -2888,6 +2888,13 @@
|
||||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue11045",
|
||||
"file": "pdfs/issue11045.pdf",
|
||||
"md5": "101d4cb649cc006e0f2b14923e8d97d6",
|
||||
"rounds": 1,
|
||||
"link": false,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue4890",
|
||||
"file": "pdfs/issue4890.pdf",
|
||||
"md5": "1666feb4cd26318c2bdbea6a175dce87",
|
||||
|
Loading…
Reference in New Issue
Block a user