summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
index 28334dac56d8..0f4a35b77ac5 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");