[Pkg-javascript-commits] [pdf.js] 32/207: Prevent infinite loop when scanning for endstream (bug 1020226)
David Prévot
taffit at moszumanska.debian.org
Mon Jul 28 15:36:26 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit 26bbcedcaea7c1e991f4f88f68d9195f975d2e4c
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Fri Jun 6 22:06:29 2014 +0200
Prevent infinite loop when scanning for endstream (bug 1020226)
---
src/core/parser.js | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/core/parser.js b/src/core/parser.js
index b5a4b79..3b3bd26 100644
--- a/src/core/parser.js
+++ b/src/core/parser.js
@@ -266,6 +266,9 @@ var Parser = (function ParserClosure() {
while (stream.pos < stream.end) {
var scanBytes = stream.peekBytes(SCAN_BLOCK_SIZE);
var scanLength = scanBytes.length - ENDSTREAM_SIGNATURE_LENGTH;
+ if (scanLength <= 0) {
+ break;
+ }
found = false;
for (i = 0, j = 0; i < scanLength; i++) {
var b = scanBytes[i];
--
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