summaryrefslogtreecommitdiff
path: root/sdext/source/pdfimport/xpdfwrapper
diff options
context:
space:
mode:
authorPhilipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM>2011-02-03 17:54:31 +0100
committerPhilipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM>2011-02-03 17:54:31 +0100
commitdb944ee55fc510ca5940728b0d16a852f12842d8 (patch)
tree8cc42dc7305397e6e7fbcfbce25a34fb013e80a6 /sdext/source/pdfimport/xpdfwrapper
parent5d1335e1f02b0ebaee310d811214b18e8a276698 (diff)
vcl119: #163136# do not pass a clear text password to xpdf
Diffstat (limited to 'sdext/source/pdfimport/xpdfwrapper')
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx19
1 files changed, 9 insertions, 10 deletions
diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
index 6011b6989576..e0c5763acac8 100644
--- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
@@ -107,8 +107,8 @@ int main(int argc, char **argv)
#endif
// try to read a possible open password form stdin
- char aPwBuf[34];
- aPwBuf[33] = 0;
+ char aPwBuf[129];
+ aPwBuf[128] = 0;
if( ! fgets( aPwBuf, sizeof(aPwBuf)-1, stdin ) )
aPwBuf[0] = 0; // mark as empty
else
@@ -132,14 +132,14 @@ int main(int argc, char **argv)
// check for password string(s)
- GooString* pOwnerPasswordStr( ownerPassword[0] != '\001'
- ? new GooString(ownerPassword)
- : (GooString *)NULL );
- GooString* pUserPasswordStr( aPwBuf[0] != 0
+ GooString* pOwnerPasswordStr( aPwBuf[0] != 0
? new GooString( aPwBuf )
- : ( userPassword[0] != '\001'
- ? new GooString(userPassword)
- : (GooString *)NULL ) );
+ : (ownerPassword[0] != '\001'
+ ? new GooString(ownerPassword)
+ : (GooString *)NULL ) );
+ GooString* pUserPasswordStr( userPassword[0] != '\001'
+ ? new GooString(userPassword)
+ : (GooString *)NULL );
if( outputFile[0] != '\001' )
g_binary_out = fopen(outputFile,"wb");
@@ -188,7 +188,6 @@ int main(int argc, char **argv)
}
else
{
-
pdfi::PDFOutDev* pOutDev( new pdfi::PDFOutDev(&aDoc) );
// tell receiver early - needed for proper progress calculation