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

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