]> git.parisson.com Git - pdf.js.git/commitdiff
Not reading the dictionary tail of streams are not allowed #389
authornotmasteryet <async.processingjs@yahoo.com>
Sat, 27 Aug 2011 01:41:07 +0000 (20:41 -0500)
committernotmasteryet <async.processingjs@yahoo.com>
Sat, 27 Aug 2011 01:41:07 +0000 (20:41 -0500)
pdf.js

diff --git a/pdf.js b/pdf.js
index 12aa9ca4c4ba0aa2d03cf4e44c59ef3d0937b20c..52fd0ffcbbb852269fcc79b52dc9349c5beb4230 100644 (file)
--- 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();