1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Add a heuristic, in src/core/jpg.js, to handle JPEG images with a wildly incorrect SOF (Start of Frame) scanLines parameter (issue 10880)

*This whole patch feels somewhat arbitrary, and I'd be slightly worried about possibly breaking something else.*

To limit the impact of these changes, we only re-parse JPEG images using a reduced `scanLines` value if and only if: An unexpected EOI (End of Image) marker was encountered during decoding of Scan data *and* the "actual" `scanLines` value is at least one order of magnitude smaller than expected.
This commit is contained in:
Jonas Jenwald 2020-01-18 12:53:40 +01:00
parent 5494f7d5bc
commit c3c3b8cd81
3 changed files with 30 additions and 4 deletions

View file

@ -0,0 +1 @@
https://github.com/mozilla/pdf.js/files/3247065/B3-T-G5-50.pdf

View file

@ -3614,6 +3614,15 @@
"lastPage": 1,
"type": "eq"
},
{ "id": "issue10880",
"file": "pdfs/issue10880.pdf",
"md5": "244ee5ee3ab88db8d8eb51d4416e2c97",
"rounds": 1,
"link": true,
"firstPage": 7,
"lastPage": 7,
"type": "eq"
},
{ "id": "issue9650",
"file": "pdfs/issue9650.pdf",
"md5": "20d50bda6b1080b6d9088811299c791e",