mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Improve handling of JPEG images without an EOI marker (issue 12841)
Given that the PDF document in the issue contains the same very large JPEG image *three* times, this patch includes a test-case where only the first page has been extracted from it.
This commit is contained in:
parent
7f199e7017
commit
cd9422a075
4 changed files with 8 additions and 1 deletions
|
@ -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)."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue