|
|
76f8c5 |
From 9e9df4b20d17478996780008bc9802a857d173fc Mon Sep 17 00:00:00 2001
|
|
|
76f8c5 |
From: Albert Astals Cid <aacid@kde.org>
|
|
|
76f8c5 |
Date: Thu, 8 Jan 2015 17:01:52 +0100
|
|
|
76f8c5 |
Subject: Fix crash on broken document
|
|
|
76f8c5 |
|
|
|
76f8c5 |
Bug #85281
|
|
|
76f8c5 |
|
|
|
76f8c5 |
diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
|
|
|
76f8c5 |
index 359c0d6..b439942 100644
|
|
|
76f8c5 |
--- a/poppler/GfxState.cc
|
|
|
76f8c5 |
+++ b/poppler/GfxState.cc
|
|
|
76f8c5 |
@@ -16,7 +16,7 @@
|
|
|
76f8c5 |
// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
|
|
|
76f8c5 |
// Copyright (C) 2006, 2007 Jeff Muizelaar <jeff@infidigm.net>
|
|
|
76f8c5 |
// Copyright (C) 2006, 2010 Carlos Garcia Campos <carlosgc@gnome.org>
|
|
|
76f8c5 |
-// Copyright (C) 2006-2014 Albert Astals Cid <aacid@kde.org>
|
|
|
76f8c5 |
+// Copyright (C) 2006-2015 Albert Astals Cid <aacid@kde.org>
|
|
|
76f8c5 |
// Copyright (C) 2009, 2012 Koji Otani <sho@bbr.jp>
|
|
|
76f8c5 |
// Copyright (C) 2009, 2011-2013 Thomas Freitag <Thomas.Freitag@alfa.de>
|
|
|
76f8c5 |
// Copyright (C) 2009 Christian Persch <chpe@gnome.org>
|
|
|
76f8c5 |
@@ -3048,8 +3048,12 @@ GfxColorSpace *GfxDeviceNColorSpace::copy() {
|
|
|
76f8c5 |
int *mappingA = NULL;
|
|
|
76f8c5 |
|
|
|
76f8c5 |
GooList *sepsCSA = new GooList(sepsCS->getLength());
|
|
|
76f8c5 |
- for (i = 0; i < sepsCS->getLength(); i++)
|
|
|
76f8c5 |
- sepsCSA->append(((GfxSeparationColorSpace *) sepsCS->get(i))->copy());
|
|
|
76f8c5 |
+ for (i = 0; i < sepsCS->getLength(); i++) {
|
|
|
76f8c5 |
+ GfxSeparationColorSpace *scs = (GfxSeparationColorSpace *) sepsCS->get(i);
|
|
|
76f8c5 |
+ if (scs != NULL) {
|
|
|
76f8c5 |
+ sepsCSA->append(scs->copy());
|
|
|
76f8c5 |
+ }
|
|
|
76f8c5 |
+ }
|
|
|
76f8c5 |
if (mapping != NULL) {
|
|
|
76f8c5 |
mappingA = (int *)gmalloc(sizeof(int) * nComps);
|
|
|
76f8c5 |
for (i = 0; i < nComps; i++)
|
|
|
76f8c5 |
--
|
|
|
76f8c5 |
cgit v0.10.2
|
|
|
76f8c5 |
|