Skip to content

Commit 559f215

Browse files
authored
Merge pull request #27 from ethomson/ethomson/ctype
Use unsigned char for ctype functions
2 parents 55b1192 + 8cf6e8f commit 559f215

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ntlm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -988,9 +988,9 @@ NTLM_INLINE(bool) generate_lm_hash(
988988
keystr2_len = (password_len > 7) ? MIN(14, password_len) - 7 : 0;
989989

990990
for (i = 0; i < keystr1_len; i++)
991-
keystr1[i] = (unsigned char)toupper(password[i]);
991+
keystr1[i] = (unsigned char)toupper((unsigned char)password[i]);
992992
for (i = 0; i < keystr2_len; i++)
993-
keystr2[i] = (unsigned char)toupper(password[i+7]);
993+
keystr2[i] = (unsigned char)toupper((unsigned char)password[i+7]);
994994

995995
/* DES encrypt the LM constant using the password as the key */
996996
des_key_from_password(&key1, keystr1, keystr1_len);

0 commit comments

Comments
 (0)