[evince] 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] libview: Check number of pages on ev_view_document_changed_cb
- Date: Fri, 31 May 2013 08:59:49 +0000 (UTC)
commit 6230a6fae0c84696e2e52e7a1d720edfd54dd38d
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 3a6bde3..706301f 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -5350,6 +5350,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]