mirror of
https://github.com/rg3/libbcrypt.git
synced 2026-10-23 12:08:58 +03:00
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
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user