Skip to content

Commit

Permalink
mozilla#3248: fixes hp scanner's bad XRef
Browse files Browse the repository at this point in the history
  • Loading branch information
yurydelendik committed Jun 22, 2013
1 parent c3030de commit c3096d9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/obj.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,12 @@ var XRef = (function XRefClosure() {
delete tableState.entryCount;
}

// Per issue 3248: hp scanners generate bad XRef
if (first === 1 && this.entries[1] && this.entries[1].free) {
// shifting the entries
this.entries.shift();
}

// Sanity check: as per spec, first object must be free
if (this.entries[0] && !this.entries[0].free)
error('Invalid XRef table: unexpected first object');
Expand Down

0 comments on commit c3096d9

Please sign in to comment.