[Pkg-javascript-commits] [pdf.js] 17/161: Prevent circular reference when checking for blend modes (issue 4370)

David Prévot taffit at moszumanska.debian.org
Sat Apr 19 14:16:18 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 b0824e1626170d10275b5177b22d3694d950d3ef
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Mon Mar 3 17:16:34 2014 +0100

    Prevent circular reference when checking for blend modes (issue 4370)
---
 src/core/evaluator.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/core/evaluator.js b/src/core/evaluator.js
index 2cf00d0..256a38e 100644
--- a/src/core/evaluator.js
+++ b/src/core/evaluator.js
@@ -75,7 +75,9 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
             continue;
           }
           var xResources = xObject.dict.get('Resources');
-          if (isDict(xResources)) {
+          // Only add the resource if it's different from the current one,
+          // otherwise we can get stuck in an infinite loop.
+          if (isDict(xResources) && xResources !== node) {
             nodes.push(xResources);
           }
         }

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