Fix the xref table with the values we've at the beginning of a xref stream (bug 1978317)
This commit is contained in:
parent
bfc20250b2
commit
78391ed85a
@ -961,6 +961,15 @@ class XRef {
|
||||
);
|
||||
}
|
||||
nums[i] = num;
|
||||
|
||||
// The entry in the xref table is the object number followed by the index.
|
||||
// So if index (gen number) is not the same as the index (i), we fix it
|
||||
// (fixes bug 1978317).
|
||||
const entry = this.getEntry(num);
|
||||
if (entry?.offset === tableOffset && entry.gen !== i) {
|
||||
entry.gen = i;
|
||||
}
|
||||
|
||||
offsets[i] = offset;
|
||||
}
|
||||
|
||||
|
||||
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -735,3 +735,4 @@
|
||||
!issue20102.pdf
|
||||
!issue20065.pdf
|
||||
!bug1708041.pdf
|
||||
!bug1978317.pdf
|
||||
|
||||
BIN
test/pdfs/bug1978317.pdf
Executable file
BIN
test/pdfs/bug1978317.pdf
Executable file
Binary file not shown.
@ -12221,5 +12221,12 @@
|
||||
"rounds": 1,
|
||||
"disableFontFace": true,
|
||||
"type": "eq"
|
||||
},
|
||||
{
|
||||
"id": "bug1978317",
|
||||
"file": "pdfs/bug1978317.pdf",
|
||||
"md5": "ae4f643ee9bb0fd725277a9d1e0fb1df",
|
||||
"rounds": 1,
|
||||
"type": "load"
|
||||
}
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user