]> granicus.if.org Git - php/commitdiff
MFB crypt fix
authorStanislav Malyshev <stas@php.net>
Mon, 12 Sep 2011 17:50:42 +0000 (17:50 +0000)
committerStanislav Malyshev <stas@php.net>
Mon, 12 Sep 2011 17:50:42 +0000 (17:50 +0000)
ext/standard/crypt.c

index 3bac50f9e47122b63a08b66d342124921ede8d8a..700811b9e659687031d58e7c9c4df0dca43b71b9 100644 (file)
@@ -179,6 +179,8 @@ PHP_FUNCTION(crypt)
                salt[2] = '\0';
 #endif
                salt_in_len = strlen(salt);
+       } else {
+               salt_in_len = MIN(PHP_MAX_SALT_LEN, salt_in_len);
        }
 
 /* Windows (win32/crypt) has a stripped down version of libxcrypt and