File CVE-2018-20662.patch of Package poppler.31330

From 9fd5ec0e6e5f763b190f2a55ceb5427cfe851d5f Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Mon, 31 Dec 2018 11:47:57 +0100
Subject: [PATCH] PDFDoc::setup: Fix return value

At that point xref can have gone wrong since extractPDFSubtype() can
have caused a reconstruct that broke stuff so instead of unconditionally
returning true, return xref->isOk()

Fixes #706
---
 poppler/PDFDoc.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: poppler-0.62.0/poppler/PDFDoc.cc
===================================================================
--- poppler-0.62.0.orig/poppler/PDFDoc.cc	2019-03-20 11:46:55.662589589 +0000
+++ poppler-0.62.0/poppler/PDFDoc.cc	2019-03-20 11:48:33.990906508 +0000
@@ -308,7 +308,7 @@ GBool PDFDoc::setup(GooString *ownerPass
   }
 
   // done
-  return gTrue;
+  return xref->isOk();
 }
 
 PDFDoc::~PDFDoc() {
openSUSE Build Service is sponsored by