From 2fe7ccfbd6cba6c324a35ac740bb955da7dd7f4c Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 2 Mar 2017 14:52:29 +0100 Subject: [PATCH] Remove another useless test on 32-bit platforms --- .../crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c index 06b932c6..3ff76570 100644 --- a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c +++ b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c @@ -24,6 +24,7 @@ * SUCH DAMAGE. */ +#include #include #include @@ -53,9 +54,11 @@ PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, int k; size_t clen; +#if SIZE_MAX > 0x1fffffffe0ULL if (dkLen > 0x1fffffffe0ULL) { abort(); } +#endif crypto_auth_hmacsha256_init(&PShctx, passwd, passwdlen); crypto_auth_hmacsha256_update(&PShctx, salt, saltlen);