]> git.parisson.com Git - pdf.js.git/commitdiff
Use lenIV to read the subrs section
authorVivien Nicolas <21@vingtetun.org>
Fri, 2 Sep 2011 11:37:39 +0000 (13:37 +0200)
committerVivien Nicolas <21@vingtetun.org>
Fri, 2 Sep 2011 11:37:39 +0000 (13:37 +0200)
fonts.js

index f17fdfc5631e1e98ff531866fb55caaa88633c31..5aa549e659993438b8d997b6ad6a0d402efb8602 100755 (executable)
--- a/fonts.js
+++ b/fonts.js
@@ -1457,7 +1457,7 @@ var Type1Parser = function() {
             for (var j = 0; j < argc; j++)
               charstring.push('drop');
 
-            // If the flex mechanishm is not used in a font program, Adobe
+            // If the flex mechanism is not used in a font program, Adobe
             // state that that entries 0, 1 and 2 can simply be replace by
             // {}, which means that we can simply ignore them.
             if (index < 3) {
@@ -1641,7 +1641,8 @@ var Type1Parser = function() {
                 var length = parseInt(getToken());
                 getToken(); // read in 'RD'
                 var data = eexec.slice(i + 1, i + 1 + length);
-                var encoded = decrypt(data, kCharStringsEncryptionKey, 4);
+                var lenIV = program.properties.private['lenIV'];
+                var encoded = decrypt(data, kCharStringsEncryptionKey, lenIV);
                 var str = decodeCharString(encoded);
                 i = i + 1 + length;
                 getToken(); //read in 'NP'