[Pkg-javascript-commits] [pdf.js] 60/204: Fetch decodeParams if it's a |Ref| in JBIG2Decode streams

David Prévot taffit at moszumanska.debian.org
Sat Oct 25 18:50:31 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 7c044bc30dca9fa9abade16875489cabececbb90
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Tue Sep 9 18:10:50 2014 +0200

    Fetch decodeParams if it's a |Ref| in JBIG2Decode streams
---
 src/core/stream.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/core/stream.js b/src/core/stream.js
index f1ade9c..482091e 100644
--- a/src/core/stream.js
+++ b/src/core/stream.js
@@ -1033,7 +1033,8 @@ var Jbig2Stream = (function Jbig2StreamClosure() {
 
     var jbig2Image = new Jbig2Image();
 
-    var chunks = [], decodeParams = this.dict.get('DecodeParms');
+    var chunks = [], xref = this.dict.xref;
+    var decodeParams = xref.fetchIfRef(this.dict.get('DecodeParms'));
 
     // According to the PDF specification, DecodeParms can be either
     // a dictionary, or an array whose elements are dictionaries.
@@ -1042,7 +1043,7 @@ var Jbig2Stream = (function Jbig2StreamClosure() {
         warn('JBIG2 - \'DecodeParms\' array with multiple elements ' +
              'not supported.');
       }
-      decodeParams = decodeParams[0];
+      decodeParams = xref.fetchIfRef(decodeParams[0]);
     }
     if (decodeParams && decodeParams.has('JBIG2Globals')) {
       var globalsStream = decodeParams.get('JBIG2Globals');

-- 
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