Merge pull request #14815 from Snuffleupagus/issue-14814
Ignore non-Stream /SMask-entries when parsing images (issue 14814)
This commit is contained in:
commit
f39219cd45
@ -275,12 +275,16 @@ class PDFImage {
|
||||
const mask = image.dict.get("Mask");
|
||||
|
||||
if (smask) {
|
||||
smaskData = smask;
|
||||
if (smask instanceof BaseStream) {
|
||||
smaskData = smask;
|
||||
} else {
|
||||
warn("Unsupported /SMask format.");
|
||||
}
|
||||
} else if (mask) {
|
||||
if (mask instanceof BaseStream || Array.isArray(mask)) {
|
||||
maskData = mask;
|
||||
} else {
|
||||
warn("Unsupported mask format.");
|
||||
warn("Unsupported /Mask format.");
|
||||
}
|
||||
}
|
||||
|
||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -505,6 +505,7 @@
|
||||
!poppler-85140-0.pdf
|
||||
!poppler-395-0-fuzzed.pdf
|
||||
!GHOSTSCRIPT-698804-1-fuzzed.pdf
|
||||
!issue14814.pdf
|
||||
!poppler-91414-0-53.pdf
|
||||
!poppler-91414-0-54.pdf
|
||||
!poppler-742-0-fuzzed.pdf
|
||||
|
BIN
test/pdfs/issue14814.pdf
Normal file
BIN
test/pdfs/issue14814.pdf
Normal file
Binary file not shown.
@ -98,6 +98,13 @@
|
||||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue14814",
|
||||
"file": "pdfs/issue14814.pdf",
|
||||
"md5": "a1c8b677335ff5ea0d07e35e7dffb6e8",
|
||||
"rounds": 1,
|
||||
"firstPage": 2,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue14269",
|
||||
"file": "pdfs/issue14269.pdf",
|
||||
"md5": "f34abf77a418f54e13fbcd03b063432e",
|
||||
|
Loading…
x
Reference in New Issue
Block a user