Browse Source

Ignore previously parsed xref streams

= 14 years ago
parent
commit
e318820a39
  1. 7
      pdf.js
  2. 1
      test/pdfs/f1040.pdf.link
  3. 6
      test/test_manifest.json

7
pdf.js

@ -3094,11 +3094,12 @@ var XRef = (function() { @@ -3094,11 +3094,12 @@ var XRef = (function() {
// check for 'XRefStm' key
if (IsInt(obj = dict.get('XRefStm'))) {
var pos = obj;
if (pos in this.xrefstms)
error('Invalid XRef table');
this.xrefstms[pos] = 1; // avoid infinite recursion
// ignore previously loaded xref streams (possible infinite recursion)
if (!(pos in this.xrefstms)) {
this.xrefstms[pos] = 1;
this.readXRef(pos);
}
}
return dict;
},

1
test/pdfs/f1040.pdf.link

@ -0,0 +1 @@ @@ -0,0 +1 @@
http://www.irs.gov/pub/irs-pdf/f1040.pdf

6
test/test_manifest.json

@ -139,5 +139,11 @@ @@ -139,5 +139,11 @@
"link": true,
"rounds": 1,
"type": "load"
},
{ "id": "f1040",
"file": "pdfs/f1040.pdf",
"link": true,
"rounds": 1,
"type": "load"
}
]

Loading…
Cancel
Save