diff options
author | Volker Lendecke <vl@samba.org> | 2009-12-14 17:43:56 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2010-01-07 11:07:51 +0100 |
commit | 147a2c057cfcf459391c67e05ce2d0be561f0382 (patch) | |
tree | 2acbbfb262e7b3e51dc3b07e4d4427134255e4fd /source3 | |
parent | 2fad148b271fe8623299af551d3ae103d85c5d5f (diff) | |
download | samba-147a2c057cfcf459391c67e05ce2d0be561f0382.tar.gz samba-147a2c057cfcf459391c67e05ce2d0be561f0382.tar.bz2 samba-147a2c057cfcf459391c67e05ce2d0be561f0382.zip |
s3: Avoid a memset(, 0, ) call
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/chgpasswd.c | 3 |
1 files changed, 1 insertions, 2 deletions
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<pwHisLen; i++) { uchar new_nt_pw_salted_md5_hash[SALTED_MD5_HASH_LEN]; const uchar *current_salt = &pwhistory[i*PW_HISTORY_ENTRY_LEN]; |