X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fevp%2Fpbe_scrypt.c;h=b30e6d571998f41e9208d51a53247f54e964e89e;hp=80a1acd2ce143200cc676945b571173c75193c13;hb=44589b5d44217aacbceff08f8317c2a0a4e0ff40;hpb=76b2ae832679d25e6952934481ac38e0e76e2271 diff --git a/crypto/evp/pbe_scrypt.c b/crypto/evp/pbe_scrypt.c index 80a1acd2ce..b30e6d5719 100644 --- a/crypto/evp/pbe_scrypt.c +++ b/crypto/evp/pbe_scrypt.c @@ -207,6 +207,8 @@ int EVP_PBE_scrypt(const char *pass, size_t passlen, if (maxmem == 0) maxmem = SCRYPT_MAX_MEM; + + /* Check that the maximum memory doesn't exceed a size_t limits */ if (maxmem > SIZE_MAX) maxmem = SIZE_MAX;