[poppler] Second opinion for patch
William Bader
williambader at hotmail.com
Fri Nov 18 02:17:27 UTC 2016
The early return seems to exit when two consecutive objects have the same id and gen.
Is that a normal marker for the end of the list or was that added as a check to prevent an infinite loop on a bad file with a circular list? Would it be better to replace the test with a better check for an infinite loop? Applications that use poppler shouldn't hang if a user opens a corrupt PDF.
In the example file, is the entry that triggers the early exit a duplicate of the previous entry? Would it be better to keep the test but skip the entry instead of exiting the loop?
William
________________________________
From: poppler <poppler-bounces at lists.freedesktop.org> on behalf of Albert Astals Cid <aacid at kde.org>
Sent: Thursday, November 17, 2016 4:05 PM
To: poppler at lists.freedesktop.org
Subject: Re: [poppler] Second opinion for patch
El dijous, 17 de novembre de 2016, a les 17:48:24 CET, Carlos Garcia Campos va
escriure:
> Albert Astals Cid <aacid at kde.org> writes:
> > Can someone have a look at
> > https://bugs.freedesktop.org/show_bug.cgi?id=98732
> >
> > I'd like a second opinion on the patch, it fixes the problem on that
> > broken
> > file for me but before commiting i'd like to know i'm not missing
> > something.
> I guess the file is broken because "Last" is required field in outline
> dictionary. In that case I would keep using Last if present, and simply
> remove the early return in OutlineItem::readItemList() otherwise.
Yes it's broken, the file does have a "Last", it's just that the "Last"
doesn't really point to the last but to somehwere in the middle (if you use
the next->next->next).
Given that Adobe Reader shows all of the items i guess it also ignores it and
just relies on next.
Cheers,
Albert
>
> > Cheers,
> >
> > Albert
> >
> > _______________________________________________
> > poppler mailing list
> > poppler at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/poppler
poppler Info Page - freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/poppler>
lists.freedesktop.org
Subscribing to poppler: Subscribe to poppler by filling out the following form. You will be sent email requesting confirmation, to prevent others from ...
_______________________________________________
poppler mailing list
poppler at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/poppler
poppler Info Page - freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/poppler>
lists.freedesktop.org
Subscribing to poppler: Subscribe to poppler by filling out the following form. You will be sent email requesting confirmation, to prevent others from ...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler/attachments/20161118/d2c4d6b6/attachment.html>
More information about the poppler
mailing list