[Poppler-bugs] [Bug 107057] [Patch] Skip XRef gaps in PDFDoc save methods

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Jul 6 15:29:28 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=107057

--- Comment #11 from Albert Astals Cid <aacid at kde.org> ---
But we can not have a different problem, no?

XRef::getEntry does

XRefEntry *XRef::getEntry(int i, GBool complainIfMissing)
{
  if (i >= size || entries[i].type == xrefEntryNone) {
    // stuff
  }
  return &entries[i];
}


and the saving code does

for(int i=0; i<xref->getNumObjects(); i++) {
    xref->getEntry(i);

and since xref->getNumObjects() is xref->size, if we make it that it ignores
the entries[i].type == xrefEntryNone part because we pass
DoNotTryToRecoverIfNone then it always just returns  &entries[i] directly,
right?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20180706/11558392/attachment.html>


More information about the Poppler-bugs mailing list