1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 01:28:06 +02:00

Merge pull request #14815 from Snuffleupagus/issue-14814

Ignore non-Stream /SMask-entries when parsing images (issue 14814)
This commit is contained in:
Tim van der Meij 2022-04-22 11:39:13 +02:00 committed by GitHub
commit f39219cd45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 2 deletions

View file

@ -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.");
}
}