76f8c5
From 942adfc25e7a00ac3cf032ced2d8949e99099f70 Mon Sep 17 00:00:00 2001
76f8c5
From: Albert Astals Cid <aacid@kde.org>
76f8c5
Date: Fri, 25 Sep 2015 00:30:58 +0200
76f8c5
Subject: [PATCH] Fix crash on AnnotInk::draw for malformed documents
76f8c5
76f8c5
---
76f8c5
 poppler/Annot.cc | 4 ++--
76f8c5
 1 file changed, 2 insertions(+), 2 deletions(-)
76f8c5
76f8c5
diff --git a/poppler/Annot.cc b/poppler/Annot.cc
76f8c5
index 85a8ac4a..29f3621f 100644
76f8c5
--- a/poppler/Annot.cc
76f8c5
+++ b/poppler/Annot.cc
76f8c5
@@ -15,7 +15,7 @@
76f8c5
 //
76f8c5
 // Copyright (C) 2006 Scott Turner <scotty1024@mac.com>
76f8c5
 // Copyright (C) 2007, 2008 Julien Rebetez <julienr@svn.gnome.org>
76f8c5
-// Copyright (C) 2007-2013 Albert Astals Cid <aacid@kde.org>
76f8c5
+// Copyright (C) 2007-2013, 2015 Albert Astals Cid <aacid@kde.org>
76f8c5
 // Copyright (C) 2007-2013 Carlos Garcia Campos <carlosgc@gnome.org>
76f8c5
 // Copyright (C) 2007, 2008 Iñigo Martínez <inigomartinez@gmail.com>
76f8c5
 // Copyright (C) 2007 Jeff Muizelaar <jeff@infidigm.net>
76f8c5
@@ -6151,7 +6151,7 @@ void AnnotInk::draw(Gfx *gfx, GBool printing) {
76f8c5
 
76f8c5
     for (int i = 0; i < inkListLength; ++i) {
76f8c5
       const AnnotPath * path = inkList[i];
76f8c5
-      if (path->getCoordsLength() != 0) {
76f8c5
+      if (path && path->getCoordsLength() != 0) {
76f8c5
         appearBuf->appendf ("{0:.2f} {1:.2f} m\n", path->getX(0) - rect->x1, path->getY(0) - rect->y1);
76f8c5
         appearBBox->extendTo (path->getX(0) - rect->x1, path->getY(0) - rect->y1);
76f8c5
 
76f8c5
-- 
76f8c5
2.17.0
76f8c5