Skip to content

Commit

Permalink
Merge pull request #27 from ethomson/ethomson/ctype
Browse files Browse the repository at this point in the history
Use unsigned char for ctype functions
  • Loading branch information
ethomson authored Oct 18, 2024
2 parents 55b1192 + 8cf6e8f commit 559f215
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ntlm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 559f215

Please sign in to comment.