From: Carlos Garcia Campos Date: Mon, 25 Aug 2008 15:20:07 +0000 (+0000) Subject: Make sure thumbnail size returned by the PDF is actually valid. Fixes bug X-Git-Tag: EVINCE_2_23_91~17 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=7c7b633bd2b8ceafe4c7172b4606bcbb386bbc5c;p=evince.git Make sure thumbnail size returned by the PDF is actually valid. Fixes bug 2008-08-25 Carlos Garcia Campos * backend/pdf/ev-poppler.cc: (pdf_document_thumbnails_get_dimensions): Make sure thumbnail size returned by the PDF is actually valid. Fixes bug #548462. svn path=/trunk/; revision=3119 --- diff --git a/ChangeLog b/ChangeLog index d5d63022..289bbea4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-08-25 Carlos Garcia Campos + + * backend/pdf/ev-poppler.cc: + (pdf_document_thumbnails_get_dimensions): + + Make sure thumbnail size returned by the PDF is actually + valid. Fixes bug #548462. + 2008-08-24 Carlos Garcia Campos * shell/ev-window.c: (ev_window_setup_document), diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc index 04f4c650..4687ac21 100644 --- a/backend/pdf/ev-poppler.cc +++ b/backend/pdf/ev-poppler.cc @@ -1338,7 +1338,7 @@ pdf_document_thumbnails_get_dimensions (EvDocumentThumbnails *document_thumbnail has_thumb = poppler_page_get_thumbnail_size (poppler_page, width, height); - if (!has_thumb) { + if (!has_thumb || *width <= 0 || *height <= 0) { double page_width, page_height; poppler_page_get_size (poppler_page, &page_width, &page_height);