Ignore previously parsed xref streams
This commit is contained in:
parent
6e859fb3e4
commit
e318820a39
9
pdf.js
9
pdf.js
@ -3094,10 +3094,11 @@ 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
|
||||
this.readXRef(pos);
|
||||
// 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
Normal file
1
test/pdfs/f1040.pdf.link
Normal file
@ -0,0 +1 @@
|
||||
http://www.irs.gov/pub/irs-pdf/f1040.pdf
|
@ -139,5 +139,11 @@
|
||||
"link": true,
|
||||
"rounds": 1,
|
||||
"type": "load"
|
||||
},
|
||||
{ "id": "f1040",
|
||||
"file": "pdfs/f1040.pdf",
|
||||
"link": true,
|
||||
"rounds": 1,
|
||||
"type": "load"
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user