From 7c7b633bd2b8ceafe4c7172b4606bcbb386bbc5c Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Mon, 25 Aug 2008 15:20:07 +0000 Subject: 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 d5d6302..289bbea 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 04f4c65..4687ac2 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); -- cgit v0.9.1