[Poppler-bugs] [Bug 85145] [pdfdetach] Segfault in Page.cc:400

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Oct 19 05:57:16 PDT 2014


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

--- Comment #3 from Carlos Garcia Campos <carlosgc at gnome.org> ---
Comment on attachment 108061
  --> https://bugs.freedesktop.org/attachment.cgi?id=108061
fix crash

Review of attachment 108061:
-----------------------------------------------------------------

::: utils/pdfdetach.cc
@@ +163,5 @@
>    nPages = doc->getCatalog()->getNumPages();
>    for (i = 0; i < nPages; ++i) {
>      page = doc->getCatalog()->getPage(i + 1);
> +    if (!page)
> +      break;

LGTM, I guess we can assume that if a page is NULL here, all others will be
invalid as well, since this could only happen in case of invalid documents,
right?

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


More information about the Poppler-bugs mailing list