diff options
author | Peter Wemm <peter@FreeBSD.org> | 2018-10-08 08:30:10 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 2018-10-08 08:30:10 +0000 |
commit | d29ecdf27f1804b1c533a3739282650ed83dbe31 (patch) | |
tree | 2528d825a15b6f1f2926dd55d258d6d296c787cc /crypto/crypt_blowfish.c | |
parent | f5bbf7923e42e842c4c6d067e48b2a94bc40de0d (diff) |
Notes
Diffstat (limited to 'crypto/crypt_blowfish.c')
-rw-r--r-- | crypto/crypt_blowfish.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/crypt_blowfish.c b/crypto/crypt_blowfish.c index ec9a188b3a288..3d306cf8d3f4d 100644 --- a/crypto/crypt_blowfish.c +++ b/crypto/crypt_blowfish.c @@ -675,9 +675,9 @@ static char *BF_crypt(const char *key, const char *setting, setting[2] < 'a' || setting[2] > 'z' || !flags_by_subtype[(unsigned int)(unsigned char)setting[2] - 'a'] || setting[3] != '$' || - setting[4] < '0' || setting[4] > '3' || + setting[4] < '0' || setting[4] > '1' || setting[5] < '0' || setting[5] > '9' || - (setting[4] == '3' && setting[5] > '1') || + (setting[4] == '1' && setting[5] > '7') || setting[6] != '$') { __set_errno(EINVAL); return NULL; @@ -877,7 +877,7 @@ char *_crypt_gensalt_blowfish_rn(const char *prefix, unsigned long count, const char *input, int size, char *output, int output_size) { if (size < 16 || output_size < 7 + 22 + 1 || - (count && (count < 4 || count > 31)) || + (count && (count < 4 || count > 17)) || prefix[0] != '$' || prefix[1] != '2' || (prefix[2] != 'a' && prefix[2] != 'y')) { if (output_size > 0) output[0] = '\0'; |