drop these memory trashers

some are the wrong length anyway, and anyway the copies remain untrashed,
and munging immutable strings is dubious

Change-Id: Ic7ac3bea35e57ed015092b3b255d48819195490d
This commit is contained in:
Caolán McNamara
2012-08-27 20:36:23 +01:00
parent fe1e685036
commit 34091bc0e3
2 changed files with 0 additions and 7 deletions

View File

@@ -1317,10 +1317,6 @@ IMPL_LINK_NOARG(ImpPDFTabSecurityPage, ClickmaPbSetPwdHdl)
}
else
maPreparedOwnerPassword = Sequence< NamedValue >();
// trash clear text passwords string memory
memset( (void*)aUserPW.getStr(), 0, aUserPW.getLength() );
memset( (void*)aOwnerPW.getStr(), 0, aOwnerPW.getLength() );
}
enablePermissionControls();
return 0;

View File

@@ -1315,9 +1315,6 @@ void PDFWriterImpl::padPassword( const rtl::OUString& i_rPassword, sal_uInt8* o_
sal_Int32 i,y;
for( i = nCurrentChar, y = 0 ; i < ENCRYPTED_PWD_SIZE; i++, y++ )
o_pPaddedPW[i] = s_nPadString[y];
// trash memory of temporary clear text password
memset( (sal_Char*)aString.getStr(), 0, aString.getLength() );
}
/**********************************