From c52e09082a15c5d93aa157dad887ec6aaade67fe Mon Sep 17 00:00:00 2001 From: notmasteryet Date: Fri, 26 Aug 2011 20:41:07 -0500 Subject: [PATCH] Not reading the dictionary tail of streams are not allowed #389 --- pdf.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pdf.js b/pdf.js index 12aa9ca4c..52fd0ffcb 100644 --- a/pdf.js +++ b/pdf.js @@ -2714,7 +2714,9 @@ var Parser = (function() { // stream objects are not allowed inside content streams or // object streams - if (this.allowStreams && IsCmd(this.buf2, 'stream')) { + if (IsCmd(this.buf2, 'stream')) { + if (!this.allowStreams) + return dict; return this.makeStream(dict, cipherTransform); } else { this.shift();