diff options
author | Arnaud Versini <arnaud.versini@gmail.com> | 2012-08-25 13:57:34 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-08-27 19:28:49 +0000 |
commit | fe1e68503651382114d76759c6901bf685d8e106 (patch) | |
tree | f5c3e7b08a131a3416e0f4b9fde95a901a5ea67d /sdext | |
parent | 95379eb197b98c2ce6e2a29e970e60bf5c02385b (diff) |
Remove ineffective password erasing security in PDF Import
Change-Id: Ic49101733f034cc1165bd3c7704481a569f8a75c
Reviewed-on: https://gerrit.libreoffice.org/489
Reviewed-by: Kohei Yoshida <kohei.yoshida@gmail.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/filterdet.cxx | 4 | ||||
-rw-r--r-- | sdext/source/pdfimport/wrapper/wrapper.cxx | 6 |
2 files changed, 0 insertions, 10 deletions
diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx index 8cbcd36da601..0629718075bf 100644 --- a/sdext/source/pdfimport/filterdet.cxx +++ b/sdext/source/pdfimport/filterdet.cxx @@ -690,8 +690,6 @@ uno::Reference< io::XStream > getAdditionalStream( const rtl::OUString& rtl::OString aIsoPwd = rtl::OUStringToOString( io_rPwd, RTL_TEXTENCODING_ISO_8859_1 ); bAuthenticated = pPDFFile->setupDecryptionData( aIsoPwd.getStr() ); - // trash password string on heap - rtl_zeroMemory( (void*)aIsoPwd.getStr(), aIsoPwd.getLength() ); } if( ! bAuthenticated ) { @@ -719,8 +717,6 @@ uno::Reference< io::XStream > getAdditionalStream( const rtl::OUString& rtl::OString aIsoPwd = rtl::OUStringToOString( io_rPwd, RTL_TEXTENCODING_ISO_8859_1 ); bAuthenticated = pPDFFile->setupDecryptionData( aIsoPwd.getStr() ); - // trash password string on heap - rtl_zeroMemory( (void*)aIsoPwd.getStr(), aIsoPwd.getLength() ); } while( bEntered && ! bAuthenticated ); } diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index 772dac337c68..61d4b29af31b 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -933,8 +933,6 @@ static bool checkEncryption( const rtl::OUString& rtl::OString aIsoPwd = rtl::OUStringToOString( io_rPwd, RTL_TEXTENCODING_ISO_8859_1 ); bAuthenticated = pPDFFile->setupDecryptionData( aIsoPwd.getStr() ); - // trash password string on heap - rtl_zeroMemory( (void*)aIsoPwd.getStr(), aIsoPwd.getLength() ); } if( bAuthenticated ) bSuccess = true; @@ -949,16 +947,12 @@ static bool checkEncryption( const rtl::OUString& rtl::OString aIsoPwd = rtl::OUStringToOString( io_rPwd, RTL_TEXTENCODING_ISO_8859_1 ); bAuthenticated = pPDFFile->setupDecryptionData( aIsoPwd.getStr() ); - // trash password string on heap - rtl_zeroMemory( (void*)aIsoPwd.getStr(), aIsoPwd.getLength() ); } while( bEntered && ! bAuthenticated ); } OSL_TRACE( "password: %s", bAuthenticated ? "matches" : "does not match" ); bSuccess = bAuthenticated; } - // trash password string on heap - rtl_zeroMemory( (void*)io_rPwd.getStr(), io_rPwd.getLength()*sizeof(sal_Unicode) ); if( bAuthenticated ) { rtl::OUStringBuffer aBuf( 128 ); |