From 13157b025e7e19f7ecc27ee93e69057b7fda9b37 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 29 Aug 2012 12:56:12 -0400 Subject: anti-DoS rounds count limits for blowfish and des crypt all of the limits could use review, but err on the side of avoiding excessive rounds for now. --- src/misc/crypt_des.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/misc/crypt_des.c') diff --git a/src/misc/crypt_des.c b/src/misc/crypt_des.c index 4454a130..d7b2b15a 100644 --- a/src/misc/crypt_des.c +++ b/src/misc/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) + if (!count || count > 262143) return NULL; for (i = 5, salt = 0; i < 9; i++) { -- cgit v1.2.1