Skip to content

Commit

Permalink
Merge pull request #5426 from fkaelberer/fixJpxOutOfPackets
Browse files Browse the repository at this point in the history
Fix JPX "Out of Packets" Error (issues 4358, 4659, 4814)
  • Loading branch information
yurydelendik committed Oct 22, 2014
2 parents 9e7966a + 6337a43 commit 04390d8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/jpx.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,11 @@ var JpxImage = (function JpxImageClosure() {
codeblock.precinctNumber = precinctNumber;
codeblock.subbandType = subband.type;
codeblock.Lblock = 3;

if (codeblock.tbx1_ <= codeblock.tbx0_ ||
codeblock.tby1_ <= codeblock.tby0_) {
continue;
}
codeblocks.push(codeblock);
// building precinct for the sub-band
var precinct = precincts[precinctNumber];
Expand Down
1 change: 1 addition & 0 deletions test/pdfs/bug865858.pdf.link
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://bug865858.bugzilla.mozilla.org/attachment.cgi?id=742273
8 changes: 8 additions & 0 deletions test/test_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -1690,6 +1690,14 @@
"type": "eq",
"about": "JPX with 0xFF55 marker"
},
{ "id": "bug865858",
"file": "pdfs/bug865858.pdf",
"md5": "7a81bd987dc1d95e9a0be46b7c3f2e18",
"link": true,
"rounds": 1,
"type": "eq",
"about": "JPX packets"
},
{ "id": "bug766138",
"file": "pdfs/bug766138.pdf",
"md5": "b171f5cf8d9834348112fba60ee54f8c",
Expand Down

0 comments on commit 04390d8

Please sign in to comment.