From 147a2c057cfcf459391c67e05ce2d0be561f0382 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 14 Dec 2009 17:43:56 +0100 Subject: s3: Avoid a memset(, 0, ) call --- source3/smbd/chgpasswd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c index 2da36b2fe6..5c46f44705 100644 --- a/source3/smbd/chgpasswd.c +++ b/source3/smbd/chgpasswd.c @@ -1017,7 +1017,7 @@ static NTSTATUS check_oem_password(const char *user, static bool check_passwd_history(struct samu *sampass, const char *plaintext) { uchar new_nt_p16[NT_HASH_LEN]; - uchar zero_md5_nt_pw[SALTED_MD5_HASH_LEN]; + static const uint8_t zero_md5_nt_pw[SALTED_MD5_HASH_LEN] = { 0, }; const uint8 *nt_pw; const uint8 *pwhistory; bool found = False; @@ -1051,7 +1051,6 @@ static bool check_passwd_history(struct samu *sampass, const char *plaintext) dump_data(100, new_nt_p16, NT_HASH_LEN); dump_data(100, pwhistory, PW_HISTORY_ENTRY_LEN*pwHisLen); - memset(zero_md5_nt_pw, '\0', SALTED_MD5_HASH_LEN); for (i=0; i