Blob Blame History Raw
From f648553dfc356b3c5e6dd77ea96039a9977f00d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Thu, 8 Nov 2018 10:58:00 +0000
Subject: [PATCH] Resolves: rhbz#1647507 try inputted password as both user and
 owner password
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Change-Id: Ibe1fae39d3153238e85400c9645766c260c9290d
Reviewed-on: https://gerrit.libreoffice.org/63080
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit e3ca8385fed93e61efb8200149e06b822a84a47e)
---
 sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
index 16db05afe870..b536a710e832 100644
--- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
@@ -101,9 +101,11 @@ int main(int argc, char **argv)
                                  : (ownerPassword[0] != '\001'
                                     ? new GooString(ownerPassword)
                                     : nullptr ) );
-    GooString* pUserPasswordStr(  userPassword[0] != '\001'
+    GooString* pUserPasswordStr( aPwBuf[0] != 0
+                                ? new GooString( aPwBuf )
+                                : (userPassword[0] != '\001'
                                   ? new GooString(userPassword)
-                                  : nullptr );
+                                  : nullptr ) );
     if( outputFile[0] != '\001' )
         g_binary_out = fopen(outputFile,"wb");
 
-- 
2.17.1