Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix crypt_blowfish 8-bit character mishandling

Bug reported in the crypt_blowfish implementation from Solar Designer.
For more information, see:

http://www.openwall.com/lists/oss-security/2011/06/20/2
  • Loading branch information...
commit 89abf2a67a9ab2a2e80adcac3d59e2ac4cf7b2ac 1 parent 7eca1ef
@rg3 authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  crypt_blowfish/crypt_blowfish.c
View
2  crypt_blowfish/crypt_blowfish.c
@@ -554,7 +554,7 @@ static void BF_set_key(__CONST char *key, BF_key expanded, BF_key initial)
tmp = 0;
for (j = 0; j < 4; j++) {
tmp <<= 8;
- tmp |= *ptr;
+ tmp |= (unsigned char)*ptr;
if (!*ptr) ptr = key; else ptr++;
}
Please sign in to comment.
Something went wrong with that request. Please try again.