summaryrefslogtreecommitdiff
blob: 3595345800f02b2a5e81fb63e995237e4b483c1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 876e7f76159e2b12ee7d2d396f327dd2cc90bcb0 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Fri, 8 Sep 2017 18:26:05 +0200
Subject: [PATCH 3/3] SplashOutputDev: Fix crash on broken files

Bug #102604

(cherry picked from commit 6472d8493f7e82cc78b41da20a2bf19fcb4e0a7d)
---
 poppler/SplashOutputDev.cc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index 5502be64..46b55a42 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -2714,7 +2714,11 @@ void SplashOutputDev::endType3Char(GfxState *state) {
 }
 
 void SplashOutputDev::type3D0(GfxState *state, double wx, double wy) {
-  t3GlyphStack->haveDx = gTrue;
+  if (likely(t3GlyphStack != nullptr)) {
+    t3GlyphStack->haveDx = gTrue;
+  } else {
+    error(errSyntaxWarning, -1, "t3GlyphStack was null in SplashOutputDev::type3D0");
+  }
 }
 
 void SplashOutputDev::type3D1(GfxState *state, double wx, double wy,
-- 
2.14.1