[Pkg-javascript-commits] [pdf.js] 137/157: Correctly access `colorSpace.numComps` in `MeshStreamReader` (issue 6287)

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 06:46:50 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit 1d65daf5e553d315079ff1312edff33d3e430687
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Fri Jul 31 17:55:51 2015 +0200

    Correctly access `colorSpace.numComps` in `MeshStreamReader` (issue 6287)
    
    This regressed in https://github.com/mozilla/pdf.js/commit/f750e35224d344f068542411bcb4f750b2d4dcdb.
---
 src/core/pattern.js       |   2 +-
 test/pdfs/.gitignore      |   1 +
 test/pdfs/issue6231_1.pdf | Bin 0 -> 23748 bytes
 test/test_manifest.json   |   7 +++++++
 4 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/core/pattern.js b/src/core/pattern.js
index eead248..42d4b23 100644
--- a/src/core/pattern.js
+++ b/src/core/pattern.js
@@ -225,7 +225,7 @@ Shadings.Mesh = (function MeshClosure() {
 
     var numComps = context.numComps;
     this.tmpCompsBuf = new Float32Array(numComps);
-    var csNumComps = context.colorSpace;
+    var csNumComps = context.colorSpace.numComps;
     this.tmpCsCompsBuf = context.colorFn ? new Float32Array(csNumComps) :
                                            this.tmpCompsBuf;
   }
diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore
index 3e6cf42..ba8c87b 100644
--- a/test/pdfs/.gitignore
+++ b/test/pdfs/.gitignore
@@ -23,6 +23,7 @@
 !sizes.pdf
 !close-path-bug.pdf
 !issue2948.pdf
+!issue6231_1.pdf
 !issue4630.pdf
 !issue4909.pdf
 !issue5202.pdf
diff --git a/test/pdfs/issue6231_1.pdf b/test/pdfs/issue6231_1.pdf
new file mode 100644
index 0000000..59e9123
Binary files /dev/null and b/test/pdfs/issue6231_1.pdf differ
diff --git a/test/test_manifest.json b/test/test_manifest.json
index 5269624..ddda2d4 100644
--- a/test/test_manifest.json
+++ b/test/test_manifest.json
@@ -641,6 +641,13 @@
        "rounds": 1,
        "type": "eq"
     },
+    {  "id": "issue6231_1",
+       "file": "pdfs/issue6231_1.pdf",
+       "md5": "eb13a9366a5142833a858472c68b4749",
+       "link": false,
+       "rounds": 1,
+       "type": "eq"
+    },
     {  "id": "usmanm-bad-auto-fetch",
        "file": "pdfs/usmanm-bad.pdf",
        "md5": "38afb822433aaf07fc8f54807cd4f61a",

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