]> www.fi.muni.cz Git - evince.git/commitdiff
Make sure thumbnail size returned by the PDF is actually valid. Fixes bug
authorCarlos Garcia Campos <carlosgc@gnome.org>
Mon, 25 Aug 2008 15:20:07 +0000 (15:20 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Mon, 25 Aug 2008 15:20:07 +0000 (15:20 +0000)
2008-08-25  Carlos Garcia Campos  <carlosgc@gnome.org>

* 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

ChangeLog
backend/pdf/ev-poppler.cc

index d5d63022093a65a30d578b025c92eb6ade6adb8f..289bbea4a29bdf52441f9781d9dea77eeb908966 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-08-25  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * 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  <carlosgc@gnome.org>
 
        * shell/ev-window.c: (ev_window_setup_document),
index 04f4c650a22f9a4a12088ec3bdf67dfaeacd53d8..4687ac21fd6b040d51002e6d767d990134e4d78a 100644 (file)
@@ -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);