[evince/gnome-3-8] libview: Check number of pages on ev_view_document_changed_cb
- From: Germán Poó Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/gnome-3-8] libview: Check number of pages on ev_view_document_changed_cb
- Date: Fri, 31 May 2013 17:33:13 +0000 (UTC)
commit 62b1585ae863b23bc9634b0cf941a9103c0aac50
Author: Germán Poo-Caamaño <gpoo gnome org>
Date: Thu May 30 18:05:36 2013 -0700
libview: Check number of pages on ev_view_document_changed_cb
Fix crash on corrupted PDF with no pages.
Thanks to Juha Kylmänen from OUSPG who were testing robutness.
(CVE-2013-3718).
https://bugzilla.gnome.org/show_bug.cgi?id=701302
libview/ev-view.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libview/ev-view.c b/libview/ev-view.c
index e656db5..7bd7f28 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -5321,6 +5321,10 @@ ev_view_document_changed_cb (EvDocumentModel *model,
{
EvDocument *document = ev_document_model_get_document (model);
+ if (ev_document_get_n_pages (document) <= 0 ||
+ !ev_document_check_dimensions (document))
+ return;
+
if (document != view->document) {
gint current_page;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]