s4-auth: Use sizeof() rather than a fixed constant in memcmp() call
authorAndrew Bartlett <abartlet@samba.org>
Mon, 1 Sep 2014 21:48:08 +0000 (09:48 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 8 Sep 2014 05:26:34 +0000 (07:26 +0200)
Change-Id: I2807cf2af9e4c3282e6ff54a6dd8e90f34e9481f
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
source4/auth/ntlm/auth_sam.c

index 6e2dd440f7b73356c16da13e58d14dd07a240a38..17f3cfc26e0f3a439c45cf4fbd8b9094c5f4f286 100644 (file)
@@ -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;
                }