[Pkg-javascript-commits] [pdf.js] 40/210: Prevent trying to map characters to the specials unicode block in adjustMapping (issue 4650)

David Prévot taffit at moszumanska.debian.org
Thu Jun 5 14:20:59 UTC 2014


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

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

commit 747dec16b221a086b52d8999f72b87c19706fb4e
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Mon Apr 28 20:09:00 2014 +0200

    Prevent trying to map characters to the specials unicode block in adjustMapping (issue 4650)
---
 src/core/fonts.js       |   2 ++
 test/pdfs/.gitignore    |   1 +
 test/pdfs/issue4650.pdf | Bin 0 -> 26856 bytes
 test/test_manifest.json |   9 +++++++++
 4 files changed, 12 insertions(+)

diff --git a/src/core/fonts.js b/src/core/fonts.js
index 8072739..6139bfd 100644
--- a/src/core/fonts.js
+++ b/src/core/fonts.js
@@ -2459,6 +2459,8 @@ var Font = (function FontClosure() {
            fontCharCode === 0x7F || // Control char
            fontCharCode === 0xAD || // Soft hyphen
            (fontCharCode >= 0x80 && fontCharCode <= 0x9F) || // Control chars
+           // Prevent drawing characters in the specials unicode block.
+           (fontCharCode >= 0xFFF0 && fontCharCode <= 0xFFFF) ||
            (isSymbolic && isIdentityUnicode)) &&
           nextAvailableFontCharCode <= PRIVATE_USE_OFFSET_END) { // Room left.
         // Loop to try and find a free spot in the private use area.
diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore
index 3067af5..ce8eaed 100644
--- a/test/pdfs/.gitignore
+++ b/test/pdfs/.gitignore
@@ -64,6 +64,7 @@
 !noembed-sjis.pdf
 !vertical.pdf
 !bug878026.pdf
+!issue4650.pdf
 !issue3025.pdf
 !issue2099-1.pdf
 !issue3371.pdf
diff --git a/test/pdfs/issue4650.pdf b/test/pdfs/issue4650.pdf
new file mode 100644
index 0000000..1adf78b
Binary files /dev/null and b/test/pdfs/issue4650.pdf differ
diff --git a/test/test_manifest.json b/test/test_manifest.json
index de9697b..869698e 100644
--- a/test/test_manifest.json
+++ b/test/test_manifest.json
@@ -430,6 +430,15 @@
        "rounds": 1,
        "type": "eq"
     },
+    {  "id": "issue4650",
+       "file": "pdfs/issue4650.pdf",
+       "md5": "ad736804f57f9f96f5ac108e514e1686",
+       "rounds": 1,
+       "link": false,
+       "firstPage": 1,
+       "lastPage": 1,
+       "type": "eq"
+    },
     {  "id": "txt2pdf",
        "file": "pdfs/txt2pdf.pdf",
        "md5": "02cefa0f5e8d96313bb05163b2f88c8c",

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