summaryrefslogtreecommitdiff
path: root/ext/standard/crypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/crypt.c')
-rw-r--r--ext/standard/crypt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c
index 03a080aa23..5bc2458894 100644
--- a/ext/standard/crypt.c
+++ b/ext/standard/crypt.c
@@ -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