From 46ea86584a9787c8b9dc3983cf23d9b5b93b5841 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 21 Jun 2024 14:29:17 +0300 Subject: fixes #4477 (libsodium: update to 1.0.20) --- .../src/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libs/libsodium/src/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c') diff --git a/libs/libsodium/src/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c b/libs/libsodium/src/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c index 9b81377ad4..eea04da8cb 100644 --- a/libs/libsodium/src/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c +++ b/libs/libsodium/src/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c @@ -24,6 +24,7 @@ #include "crypto_pwhash_scryptsalsa208sha256.h" #include "crypto_scrypt.h" #include "private/common.h" +#include "randombytes.h" #include "runtime.h" #include "utils.h" @@ -150,6 +151,10 @@ escrypt_r(escrypt_local_t *local, const uint8_t *passwd, size_t passwdlen, uint32_t r; uint32_t p; + if (buf != NULL) { + randombytes_buf(buf, buflen); + } + src = escrypt_parse_setting(setting, &N_log2, &r, &p); if (!src) { return NULL; -- cgit v1.2.3