Merge pull request #12842 from Snuffleupagus/issue-12841

Improve handling of JPEG images without an EOI marker (issue 12841)
This commit is contained in:
Tim van der Meij 2021-01-10 13:21:28 +01:00 committed by GitHub
commit f85b8721d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 1 deletions

View File

@ -1063,7 +1063,7 @@ var JpegImage = (function JpegImageClosure() {
offset = nextFileMarker.offset;
break;
}
if (offset >= data.length - 1) {
if (!nextFileMarker || offset >= data.length - 1) {
warn(
"JpegImage.parse - reached the end of the image data " +
"without finding an EOI marker (0xFFD9)."

View File

@ -241,6 +241,7 @@
!personwithdog.pdf
!helloworld-bad.pdf
!zerowidthline.pdf
!issue12841_reduced.pdf
!bug868745.pdf
!mmtype1.pdf
!issue4436r.pdf

Binary file not shown.

View File

@ -3236,6 +3236,12 @@
"link": true,
"type": "eq"
},
{ "id": "issue12841",
"file": "pdfs/issue12841_reduced.pdf",
"md5": "5c645897c652853ad86b59df5fc6cce0",
"rounds": 1,
"type": "eq"
},
{ "id": "issue1597",
"file": "pdfs/issue1597.pdf",
"md5": "a5ebef467fd6e2fc0aeb56c9eb725ae3",