diff --git a/src/fonts.js b/src/fonts.js index e86be2d20..ff2b94a8d 100644 --- a/src/fonts.js +++ b/src/fonts.js @@ -5315,11 +5315,8 @@ var Type1Parser = (function Type1ParserClosure() { case 'Subrs': var num = this.readInt(); this.getToken(); // read in 'array' - for (var j = 0; j < num; ++j) { - token = this.getToken(); // read in 'dup' + while ((token = this.getToken()) === 'dup') { var index = this.readInt(); - if (index > j) - j = index; var length = this.readInt(); this.getToken(); // read in 'RD' or '-|' var data = stream.makeSubStream(stream.pos + 1, length); diff --git a/test/pdfs/issue3207.pdf.link b/test/pdfs/issue3207.pdf.link new file mode 100644 index 000000000..66d4185d7 --- /dev/null +++ b/test/pdfs/issue3207.pdf.link @@ -0,0 +1 @@ +https://www.eff.org/sites/default/files/filenode/DMCA/NTIA%20DMCA%20White%20Paper.pdf diff --git a/test/test_manifest.json b/test/test_manifest.json index a0ab828e8..8b918bddd 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -1135,6 +1135,15 @@ "rounds": 1, "type": "eq" }, + { "id": "issue3207", + "file": "pdfs/issue3207.pdf", + "md5": "667248adae0462c7f5acc7757d97b720", + "link": true, + "firstPage": 1, + "lastPage": 1, + "rounds": 1, + "type": "eq" + }, { "id": "issue2829", "file": "pdfs/issue2829.pdf", "md5": "f32b28cf8792f6ccc470446bfbb38584",