summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcli/auth/smbencrypt.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libcli/auth/smbencrypt.c b/libcli/auth/smbencrypt.c
index a3182cd806..f7c60e7de1 100644
--- a/libcli/auth/smbencrypt.c
+++ b/libcli/auth/smbencrypt.c
@@ -100,13 +100,9 @@ bool E_md4hash(const char *passwd, uint8_t p16[16])
void E_md5hash(const uint8_t salt[16], const uint8_t nthash[16], uint8_t hash_out[16])
{
struct MD5Context tctx;
- uint8_t array[32];
-
- memset(hash_out, '\0', 16);
- memcpy(array, salt, 16);
- memcpy(&array[16], nthash, 16);
MD5Init(&tctx);
- MD5Update(&tctx, array, 32);
+ MD5Update(&tctx, salt, 16);
+ MD5Update(&tctx, nthash, 16);
MD5Final(hash_out, &tctx);
}