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