Merge pull request #15192 from Snuffleupagus/issue-15139
Ignore invalid /CIDToGIDMap-entries when parsing fonts (issue 15139)
This commit is contained in:
commit
a9fc8792c8
@ -3373,9 +3373,16 @@ class PartialEvaluator {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const cidToGidMap = dict.get("CIDToGIDMap");
|
try {
|
||||||
if (cidToGidMap instanceof BaseStream) {
|
const cidToGidMap = dict.get("CIDToGIDMap");
|
||||||
cidToGidBytes = cidToGidMap.getBytes();
|
if (cidToGidMap instanceof BaseStream) {
|
||||||
|
cidToGidBytes = cidToGidMap.getBytes();
|
||||||
|
}
|
||||||
|
} catch (ex) {
|
||||||
|
if (!this.options.ignoreErrors) {
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
warn(`extractDataStructures - ignoring CIDToGIDMap data: "${ex}".`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
test/pdfs/issue15139.pdf.link
Normal file
1
test/pdfs/issue15139.pdf.link
Normal file
@ -0,0 +1 @@
|
|||||||
|
https://github.com/mozilla/pdf.js/files/9137443/sample4a.pdf
|
@ -4980,6 +4980,14 @@
|
|||||||
"lastPage": 1,
|
"lastPage": 1,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
|
{ "id": "issue15139",
|
||||||
|
"file": "pdfs/issue15139.pdf",
|
||||||
|
"md5": "0f2beb6a788d1e47bb9af737f6670493",
|
||||||
|
"rounds": 1,
|
||||||
|
"link": true,
|
||||||
|
"lastPage": 1,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
{ "id": "gesamt",
|
{ "id": "gesamt",
|
||||||
"file": "pdfs/gesamt.pdf",
|
"file": "pdfs/gesamt.pdf",
|
||||||
"md5": "743aaa6f46ed0a42864f079d632d942e",
|
"md5": "743aaa6f46ed0a42864f079d632d942e",
|
||||||
|
Loading…
Reference in New Issue
Block a user