From 8cf6e8f04c9d8c94a608da84c16b48b991d5ea3a Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Fri, 18 Oct 2024 16:23:15 +0100 Subject: [PATCH] Use unsigned char for ctype functions --- src/ntlm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ntlm.c b/src/ntlm.c index 44421f5..28dff67 100644 --- a/src/ntlm.c +++ b/src/ntlm.c @@ -988,9 +988,9 @@ NTLM_INLINE(bool) generate_lm_hash( keystr2_len = (password_len > 7) ? MIN(14, password_len) - 7 : 0; for (i = 0; i < keystr1_len; i++) - keystr1[i] = (unsigned char)toupper(password[i]); + keystr1[i] = (unsigned char)toupper((unsigned char)password[i]); for (i = 0; i < keystr2_len; i++) - keystr2[i] = (unsigned char)toupper(password[i+7]); + keystr2[i] = (unsigned char)toupper((unsigned char)password[i+7]); /* DES encrypt the LM constant using the password as the key */ des_key_from_password(&key1, keystr1, keystr1_len);