From 06e35a776b5acbc3f0742c2deae1ecaad1132640 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 7 Oct 2004 19:14:21 +0000 Subject: [PATCH] Removed wrong memset calls. --- dlls/advapi32/crypt_md4.c | 6 +----- dlls/advapi32/crypt_md5.c | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/dlls/advapi32/crypt_md4.c b/dlls/advapi32/crypt_md4.c index 1eb8e3ed243..4c3f9bb92db 100644 --- a/dlls/advapi32/crypt_md4.c +++ b/dlls/advapi32/crypt_md4.c @@ -176,11 +176,7 @@ VOID WINAPI MD4Final( MD4_CTX *ctx ) MD4Transform( ctx->buf, (unsigned int *)ctx->in ); byteReverse( (unsigned char *)ctx->buf, 4 ); - - if ( ctx->digest != NULL ) - memcpy( ctx->digest, ctx->buf, 16 ); - - memset( ctx, 0, sizeof(ctx) ); /* In case it's sensitive */ + memcpy( ctx->digest, ctx->buf, 16 ); } /* The three core functions */ diff --git a/dlls/advapi32/crypt_md5.c b/dlls/advapi32/crypt_md5.c index 37c054062d8..96ff048967d 100644 --- a/dlls/advapi32/crypt_md5.c +++ b/dlls/advapi32/crypt_md5.c @@ -176,11 +176,7 @@ VOID WINAPI MD5Final( MD5_CTX *ctx ) MD5Transform( ctx->buf, (unsigned int *)ctx->in ); byteReverse( (unsigned char *)ctx->buf, 4 ); - - if ( ctx->digest != NULL ) - memcpy( ctx->digest, ctx->buf, 16 ); - - memset( ctx, 0, sizeof(ctx) ); /* In case it's sensitive */ + memcpy( ctx->digest, ctx->buf, 16 ); } /* The four core functions - F1 is optimized somewhat */