about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/crypt/crypt_blowfish.c2
-rw-r--r--src/crypt/crypt_des.c2
-rw-r--r--src/crypt/crypt_sha256.c2
-rw-r--r--src/crypt/crypt_sha512.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/crypt/crypt_blowfish.c b/src/crypt/crypt_blowfish.c
index bd37be84..d3f79851 100644
--- a/src/crypt/crypt_blowfish.c
+++ b/src/crypt/crypt_blowfish.c
@@ -625,7 +625,7 @@ static char *BF_crypt(const char *key, const char *setting,
 	}
 
 	count = (BF_word)1 << ((setting[4] - '0') * 10 + (setting[5] - '0'));
-	if (count < min || count > 2048 || BF_decode(data.binary.salt, &setting[7], 16)) {
+	if (count < min || BF_decode(data.binary.salt, &setting[7], 16)) {
 		return NULL;
 	}
 	BF_swap(data.binary.salt, 4);
diff --git a/src/crypt/crypt_des.c b/src/crypt/crypt_des.c
index d7b2b15a..4454a130 100644
--- a/src/crypt/crypt_des.c
+++ b/src/crypt/crypt_des.c
@@ -911,7 +911,7 @@ static char *_crypt_extended_r_uut(const char *_key, const char *_setting, char
 				return NULL;
 			count |= value << (i - 1) * 6;
 		}
-		if (!count || count > 262143)
+		if (!count)
 			return NULL;
 
 		for (i = 5, salt = 0; i < 9; i++) {
diff --git a/src/crypt/crypt_sha256.c b/src/crypt/crypt_sha256.c
index 2dc27ee7..076e4b16 100644
--- a/src/crypt/crypt_sha256.c
+++ b/src/crypt/crypt_sha256.c
@@ -172,7 +172,7 @@ static char *to64(char *s, unsigned int u, int n)
 #define SALT_MAX 16
 #define ROUNDS_DEFAULT 5000
 #define ROUNDS_MIN 1000
-#define ROUNDS_MAX 50000
+#define ROUNDS_MAX 9999999
 
 /* hash n bytes of the repeated md message digest */
 static void hashmd(struct sha256 *s, unsigned int n, const void *md)
diff --git a/src/crypt/crypt_sha512.c b/src/crypt/crypt_sha512.c
index 2c0de698..0f1de814 100644
--- a/src/crypt/crypt_sha512.c
+++ b/src/crypt/crypt_sha512.c
@@ -193,7 +193,7 @@ static char *to64(char *s, unsigned int u, int n)
 #define SALT_MAX 16
 #define ROUNDS_DEFAULT 5000
 #define ROUNDS_MIN 1000
-#define ROUNDS_MAX 20000
+#define ROUNDS_MAX 9999999
 
 /* hash n bytes of the repeated md message digest */
 static void hashmd(struct sha512 *s, unsigned int n, const void *md)