summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorArnaud Versini <arnaud.versini@gmail.com>2012-08-25 13:57:34 +0200
committerCaolán McNamara <caolanm@redhat.com>2012-08-27 19:28:49 +0000
commitfe1e68503651382114d76759c6901bf685d8e106 (patch)
treef5c3e7b08a131a3416e0f4b9fde95a901a5ea67d /sdext
parent95379eb197b98c2ce6e2a29e970e60bf5c02385b (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.cxx4
-rw-r--r--sdext/source/pdfimport/wrapper/wrapper.cxx6
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 );