Blame SOURCES/0001-Resolves-rhbz-1647507-try-inputted-password-as-both-.patch

bf2fec
From f648553dfc356b3c5e6dd77ea96039a9977f00d6 Mon Sep 17 00:00:00 2001
bf2fec
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
bf2fec
Date: Thu, 8 Nov 2018 10:58:00 +0000
bf2fec
Subject: [PATCH] Resolves: rhbz#1647507 try inputted password as both user and
bf2fec
 owner password
bf2fec
MIME-Version: 1.0
bf2fec
Content-Type: text/plain; charset=UTF-8
bf2fec
Content-Transfer-Encoding: 8bit
bf2fec
bf2fec
Change-Id: Ibe1fae39d3153238e85400c9645766c260c9290d
bf2fec
Reviewed-on: https://gerrit.libreoffice.org/63080
bf2fec
Tested-by: Jenkins
bf2fec
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
bf2fec
Tested-by: Caolán McNamara <caolanm@redhat.com>
bf2fec
(cherry picked from commit e3ca8385fed93e61efb8200149e06b822a84a47e)
bf2fec
---
bf2fec
 sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx | 6 ++++--
bf2fec
 1 file changed, 4 insertions(+), 2 deletions(-)
bf2fec
bf2fec
diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
bf2fec
index 16db05afe870..b536a710e832 100644
bf2fec
--- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
bf2fec
+++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
bf2fec
@@ -101,9 +101,11 @@ int main(int argc, char **argv)
bf2fec
                                  : (ownerPassword[0] != '\001'
bf2fec
                                     ? new GooString(ownerPassword)
bf2fec
                                     : nullptr ) );
bf2fec
-    GooString* pUserPasswordStr(  userPassword[0] != '\001'
bf2fec
+    GooString* pUserPasswordStr( aPwBuf[0] != 0
bf2fec
+                                ? new GooString( aPwBuf )
bf2fec
+                                : (userPassword[0] != '\001'
bf2fec
                                   ? new GooString(userPassword)
bf2fec
-                                  : nullptr );
bf2fec
+                                  : nullptr ) );
bf2fec
     if( outputFile[0] != '\001' )
bf2fec
         g_binary_out = fopen(outputFile,"wb");
bf2fec
 
bf2fec
-- 
bf2fec
2.17.1
bf2fec