summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Voytenko <mav@openoffice.org>2010-11-25 17:50:45 +0100
committerMikhail Voytenko <mav@openoffice.org>2010-11-25 17:50:45 +0100
commit8cbc2d0363811781f5de45b3a11b3614feec4a9a (patch)
treefaf257506042b4c540ba64fc0b64d87f0e64d321
parent831bb211b6d19b21848908114ced092fec5bd343 (diff)
pl08: #163778# fix buildbot - use rtl functions
-rw-r--r--comphelper/source/misc/docpasswordhelper.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx
index 697f221d9c80..3c8d66bd57e4 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -294,10 +294,10 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence(
if ( aPassword.getLength() && aDocId.getLength() == 16 )
{
sal_uInt16 pPassData[16];
- memset( pPassData, 0, sizeof(pPassData) );
+ rtl_zeroMemory( pPassData, sizeof(pPassData) );
sal_Int32 nPassLen = ::std::min< sal_Int32 >( aPassword.getLength(), 15 );
- (void)memcpy( pPassData, aPassword.getStr(), nPassLen * sizeof(pPassData[0]) );
+ rtl_copyMemory( pPassData, aPassword.getStr(), nPassLen * sizeof(pPassData[0]) );
aResultKey = GenerateStd97Key( pPassData, aDocId );
}
@@ -312,7 +312,7 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence(
if ( pPassData[0] && aDocId.getLength() == 16 )
{
sal_uInt8 pKeyData[64];
- (void)memset( pKeyData, 0, sizeof(pKeyData) );
+ rtl_zeroMemory( pKeyData, sizeof(pKeyData) );
sal_Int32 nInd = 0;
@@ -342,7 +342,7 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence(
// Update digest with padding.
pKeyData[16] = 0x80;
- (void)memset (pKeyData + 17, 0, sizeof(pKeyData) - 17);
+ rtl_zeroMemory( pKeyData + 17, sizeof(pKeyData) - 17 );
pKeyData[56] = 0x80;
pKeyData[57] = 0x0a;
@@ -353,7 +353,7 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence(
rtl_digest_rawMD5 ( hDigest, (sal_uInt8*)aResultKey.getArray(), aResultKey.getLength() );
// Erase KeyData array and leave.
- (void)memset (pKeyData, 0, sizeof(pKeyData));
+ rtl_zeroMemory( pKeyData, sizeof(pKeyData) );
}
return aResultKey;