Bug 874851: ignoring bad stream length

This commit is contained in:
Yury Delendik 2013-06-21 17:35:52 -05:00
parent df6fd387df
commit 0d229351f3

View File

@ -208,8 +208,9 @@ var Parser = (function ParserClosure() {
stream.pos = pos + length;
this.shift(); // '>>'
this.shift(); // 'stream'
if (!isCmd(this.buf1, 'endstream'))
error('Missing endstream');
if (!isCmd(this.buf1, 'endstream')) {
warn('Missing endstream');
}
this.shift();
stream = stream.makeSubStream(pos, length, dict);