[Pkg-javascript-commits] [pdf.js] 105/116: Fix CCITTStream regression by byte-aligning rows before checking EOL marker
David Prévot
taffit at moszumanska.debian.org
Fri Mar 6 16:20:06 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit 27e3558a41c8f891539aab32b9015f5fbaef6402
Author: Tim van der Meij <timvandermeij at gmail.com>
Date: Fri Feb 13 21:17:27 2015 +0100
Fix CCITTStream regression by byte-aligning rows before checking EOL marker
---
src/core/stream.js | 8 ++++----
test/pdfs/issue5726.pdf.link | 1 +
test/test_manifest.json | 7 +++++++
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/core/stream.js b/src/core/stream.js
index 687c7c9..2b818b9 100644
--- a/src/core/stream.js
+++ b/src/core/stream.js
@@ -2044,6 +2044,10 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
var gotEOL = false;
+ if (this.byteAlign) {
+ this.inputBits &= ~7;
+ }
+
if (!this.eoblock && this.row === this.rows - 1) {
this.eof = true;
} else {
@@ -2067,10 +2071,6 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
}
}
- if (this.byteAlign && !gotEOL) {
- this.inputBits &= ~7;
- }
-
if (!this.eof && this.encoding > 0) {
this.nextLine2D = !this.lookBits(1);
this.eatBits(1);
diff --git a/test/pdfs/issue5726.pdf.link b/test/pdfs/issue5726.pdf.link
new file mode 100644
index 0000000..2784200
--- /dev/null
+++ b/test/pdfs/issue5726.pdf.link
@@ -0,0 +1 @@
+http://digipool.bib-bvb.de/bvb/info/OCR_with_TIFFG4.pdf
diff --git a/test/test_manifest.json b/test/test_manifest.json
index e61bce5..0bc8ac3 100644
--- a/test/test_manifest.json
+++ b/test/test_manifest.json
@@ -1606,6 +1606,13 @@
"lastPage": 1,
"type": "eq"
},
+ { "id": "issue5726",
+ "file": "pdfs/issue5726.pdf",
+ "md5": "f52f31ad3da316b599cade875ab049db",
+ "rounds": 1,
+ "link": true,
+ "type": "eq"
+ },
{ "id": "bug816075",
"file": "pdfs/bug816075.pdf",
"md5": "7ec87c115c1f9ec41234cc7002555e82",
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list