<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>The early return seems to exit when two consecutive objects have the same id and gen.</p>
<p><br>
</p>
<p>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.</p>
<p><br>
</p>
<p>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?</p>
<p><br>
</p>
<p>William</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> poppler <poppler-bounces@lists.freedesktop.org> on behalf of Albert Astals Cid <aacid@kde.org><br>
<b>Sent:</b> Thursday, November 17, 2016 4:05 PM<br>
<b>To:</b> poppler@lists.freedesktop.org<br>
<b>Subject:</b> Re: [poppler] Second opinion for patch</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">El dijous, 17 de novembre de 2016, a les 17:48:24 CET, Carlos Garcia Campos va
<br>
escriure:<br>
> Albert Astals Cid <aacid@kde.org> writes:<br>
> > Can someone have a look at<br>
> > <a href="https://bugs.freedesktop.org/show_bug.cgi?id=98732" id="LPlnk800695" previewremoved="true">
https://bugs.freedesktop.org/show_bug.cgi?id=98732</a><br>
> > <br>
> > I'd like a second opinion on the patch, it fixes the problem on that<br>
> > broken<br>
> > file for me but before commiting i'd like to know i'm not missing<br>
> > something.<br>
> I guess the file is broken because "Last" is required field in outline<br>
> dictionary. In that case I would keep using Last if present, and simply<br>
> remove the early return in OutlineItem::readItemList() otherwise.<br>
<br>
Yes it's broken, the file does have a "Last", it's just that the "Last" <br>
doesn't really point to the last but to somehwere in the middle (if you use <br>
the next->next->next).<br>
<br>
Given that Adobe Reader shows all of the items i guess it also ignores it and <br>
just relies on next.<br>
<br>
Cheers,<br>
  Albert<br>
<br>
> <br>
> > Cheers,<br>
> > <br>
> >   Albert<br>
> > <br>
> > _______________________________________________<br>
> > poppler mailing list<br>
> > poppler@lists.freedesktop.org<br>
> > <a href="https://lists.freedesktop.org/mailman/listinfo/poppler" id="LPlnk117070" previewremoved="true">
https://lists.freedesktop.org/mailman/listinfo/poppler</a>
<div id="LPBorder_GT_14794347435430.34989420320022857" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_14794347435400.3256037257427633" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_14794347435410.642723853071087" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_14794347435410.5379344508614317"></div>
<div id="LPTitle_14794347435410.6143846868372185" style="top: 0px; color: rgb(0, 120, 215); font-weight: normal; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_14794347435420.9874228303664285" href="https://lists.freedesktop.org/mailman/listinfo/poppler" target="_blank" style="text-decoration: none;">poppler Info Page - freedesktop.org</a></div>
<div id="LPMetadata_14794347435420.46147476403216103" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
lists.freedesktop.org</div>
<div id="LPDescription_14794347435430.14219598897230123" style="display: block; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
Subscribing to poppler: Subscribe to poppler by filling out the following form. You will be sent email requesting confirmation, to prevent others from ...</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
<br>
<br>
_______________________________________________<br>
poppler mailing list<br>
poppler@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/poppler" id="LPlnk758805" previewremoved="true">https://lists.freedesktop.org/mailman/listinfo/poppler</a>
<div id="LPBorder_GT_14794348030760.17663185958502003" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_14794348030710.1771825390559325" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_14794348030730.3337994464819347" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_14794348030730.33525303745296764"></div>
<div id="LPTitle_14794348030730.48784786699945437" style="top: 0px; color: rgb(0, 120, 215); font-weight: normal; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_14794348030740.5613493438380315" href="https://lists.freedesktop.org/mailman/listinfo/poppler" target="_blank" style="text-decoration: none;">poppler Info Page - freedesktop.org</a></div>
<div id="LPMetadata_14794348030740.18778584931543563" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
lists.freedesktop.org</div>
<div id="LPDescription_14794348030750.9633559950983541" style="display: block; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
Subscribing to poppler: Subscribe to poppler by filling out the following form. You will be sent email requesting confirmation, to prevent others from ...</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>