File CVE-2017-14977.patch of Package poppler.8309

From 19eedc6fb693a62f305e13079501e3105f869f3c Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Sat, 30 Sep 2017 11:12:31 +0200
Subject: [PATCH] Fix crash in broken files

Bug #103045
---
 fofi/FoFiTrueType.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fofi/FoFiTrueType.cc b/fofi/FoFiTrueType.cc
index 58f604aa..4495cb3b 100644
--- a/fofi/FoFiTrueType.cc
+++ b/fofi/FoFiTrueType.cc
@@ -451,7 +451,7 @@ int FoFiTrueType::mapNameToGID(char *name) {
 GBool FoFiTrueType::getCFFBlock(char **start, int *length) {
   int i;
 
-  if (!openTypeCFF) {
+  if (!openTypeCFF || !tables) {
     return gFalse;
   }
   i = seekTable("CFF ");
-- 
2.14.2