mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #11231 from Snuffleupagus/indexObjects-entries-gen
Allow over-writing entries, in `XRef.indexObjects`, only when the generation number matches (issues 11230, 11139, 9552, 9129, 7303)
This commit is contained in:
commit
c54bb222ca
7 changed files with 49 additions and 1 deletions
|
@ -1415,7 +1415,7 @@ var XRef = (function XRefClosure() {
|
|||
position += skipUntil(buffer, position, startxrefBytes);
|
||||
} else if ((m = objRegExp.exec(token))) {
|
||||
const num = m[1] | 0, gen = m[2] | 0;
|
||||
if (typeof this.entries[num] === 'undefined') {
|
||||
if (!this.entries[num] || this.entries[num].gen === gen) {
|
||||
this.entries[num] = {
|
||||
offset: position - stream.start,
|
||||
gen,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue