diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2008-08-25 15:20:07 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@src.gnome.org> | 2008-08-25 15:20:07 (GMT) |
commit | 7c7b633bd2b8ceafe4c7172b4606bcbb386bbc5c (patch) | |
tree | 5c601fb2912481a2bd67e7e5a50af1897861460c | |
parent | b8bb6cf058641d8aa77fde650007a77afbd77b4a (diff) |
Make sure thumbnail size returned by the PDF is actually valid. Fixes bug
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
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | backend/pdf/ev-poppler.cc | 2 |
2 files changed, 9 insertions, 1 deletions
@@ -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), 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); |