[evince] backend: check action is a valid pointer. Fixes 756572



commit fb22f9d8c123c34558e13cf0be68baea7a089364
Author: Germán Poo-Caamaño <gpoo gnome org>
Date:   Wed Oct 14 09:27:07 2015 -0700

    backend: check action is a valid pointer. Fixes 756572
    
    Somehow, poppler_annot_screen_get_action() returns NULL and it
    was not being checked for POPPLER_ANNOT_SCREEN.

 backend/pdf/ev-poppler.cc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc
index 91b46bd..f3a6510 100644
--- a/backend/pdf/ev-poppler.cc
+++ b/backend/pdf/ev-poppler.cc
@@ -2924,7 +2924,7 @@ ev_annot_from_poppler_annot (PopplerAnnot *poppler_annot,
 
                        /* Ignore screen annots containing a rendition action */
                        action = poppler_annot_screen_get_action (POPPLER_ANNOT_SCREEN (poppler_annot));
-                       if (action->type == POPPLER_ACTION_RENDITION)
+                       if (action && action->type == POPPLER_ACTION_RENDITION)
                                break;
                }
                        /* Fall through */
@@ -3787,7 +3787,7 @@ pdf_document_media_get_media_mapping (EvDocumentMedia *document_media,
                        PopplerAction *action;
 
                        action = poppler_annot_screen_get_action (POPPLER_ANNOT_SCREEN (mapping->annot));
-                       if (action->type == POPPLER_ACTION_RENDITION) {
+                       if (action && action->type == POPPLER_ACTION_RENDITION) {
                                media = ev_media_from_poppler_rendition (EV_DOCUMENT (pdf_document), page,
                                                                         action->rendition.media);
                        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]