mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-21 15:48:06 +02:00
Add basic validation of the 'trailer' dictionary candidates in XRef.indexObjects
(issue 9418)
This patch avoids choosing a (possible) 'trailer' dictionary that `XRef.parse` and/or the `Catalog` constructor/methods will reject anyway. Since `XRef.indexObjects` is already parsing the entire PDF file, the extra dictionary look-ups added here shouldn't matter much. Besides, this is a fallback code-path that only applies to corrupt PDF files anyway.
This commit is contained in:
parent
346810e02a
commit
56e3648b65
4 changed files with 28 additions and 5 deletions
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
|
@ -68,6 +68,7 @@
|
|||
!issue9252.pdf
|
||||
!issue9262_reduced.pdf
|
||||
!issue9291.pdf
|
||||
!issue9418.pdf
|
||||
!issue9458.pdf
|
||||
!bad-PageLabels.pdf
|
||||
!decodeACSuccessive.pdf
|
||||
|
|
BIN
test/pdfs/issue9418.pdf
Normal file
BIN
test/pdfs/issue9418.pdf
Normal file
Binary file not shown.
|
@ -748,6 +748,13 @@
|
|||
"link": false,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue9418",
|
||||
"file": "pdfs/issue9418.pdf",
|
||||
"md5": "32ecad8098acb1938539d47944ecb54b",
|
||||
"rounds": 1,
|
||||
"link": false,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue9262",
|
||||
"file": "pdfs/issue9262_reduced.pdf",
|
||||
"md5": "5347ce2d7b3866625c22e115fd90e0de",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue