[PATCH 02/12] s4-auth: Use sizeof() rather than a fixed constant in memcmp() call
abartlet at samba.org
abartlet at samba.org
Sun Sep 7 17:30:28 MDT 2014
From: Andrew Bartlett <abartlet at samba.org>
Change-Id: I2807cf2af9e4c3282e6ff54a6dd8e90f34e9481f
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
---
source4/auth/ntlm/auth_sam.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/source4/auth/ntlm/auth_sam.c b/source4/auth/ntlm/auth_sam.c
index 6e2dd44..17f3cfc 100644
--- a/source4/auth/ntlm/auth_sam.c
+++ b/source4/auth/ntlm/auth_sam.c
@@ -326,7 +326,8 @@ static NTSTATUS authsam_password_check_and_record(struct auth4_context *auth_con
}
/* Skip over all-zero hashes in the history */
- if (memcmp(nt_history_pwd->hash, zero_hash.hash, 16) == 0) {
+ if (memcmp(nt_history_pwd->hash, zero_hash.hash,
+ sizeof(zero_hash.hash)) == 0) {
continue;
}
--
2.1.0
More information about the samba-technical
mailing list