Merge pull request #15593 from Snuffleupagus/issue-9105-other

Relax the /Pages dictionary /Count check for corrupt documents (issue 9105)
This commit is contained in:
Jonas Jenwald 2022-10-19 16:26:14 +02:00 committed by GitHub
commit e00a040a80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 4 deletions

View File

@ -591,10 +591,6 @@ class XRef {
if (!(pagesDict instanceof Dict)) {
continue;
}
const pagesCount = pagesDict.get("Count");
if (!Number.isInteger(pagesCount)) {
continue;
}
// The top-level /Pages dictionary isn't obviously corrupt.
} catch (ex) {
trailerError = ex;

View File

@ -94,6 +94,7 @@
!issue9084.pdf
!issue12963.pdf
!issue9105_reduced.pdf
!issue9105_other.pdf
!issue9252.pdf
!issue9262_reduced.pdf
!issue9291.pdf

View File

@ -0,0 +1,14 @@
%PDF-1.
1 0 obj
<</Kids[<</Parent 1 0 R/Contents[2 0 R]>>]/Resources<<>>>>
2 0 obj
<<>>
stream
BT
/F1 105 Tf
0 400 Td
(Adobe tweet) Tj
ET
endstream
endobj
trailer<</Root<</Pages 1 0 R>>>>

View File

@ -1748,6 +1748,13 @@
"link": false,
"type": "eq"
},
{ "id": "issue9105_other",
"file": "pdfs/issue9105_other.pdf",
"md5": "4c8b9c2cceb9c5d621e1d50b3dc38efc",
"rounds": 1,
"link": false,
"type": "eq"
},
{ "id": "issue269_1",
"file": "pdfs/issue269_1.pdf",
"md5": "ab932f697b4d2e2bf700de15a8efea9c",