From c2ef7d0882a1c08c130e57efd83558fe213879d0 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 15 Jul 2017 17:51:10 +0200 Subject: [PATCH] Bail out if SIZE_MAX < crypto_pwhash_MEMLIMIT_MAX --- src/libsodium/crypto_pwhash/crypto_pwhash.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libsodium/crypto_pwhash/crypto_pwhash.c b/src/libsodium/crypto_pwhash/crypto_pwhash.c index 3bccfe2b..878ef6af 100644 --- a/src/libsodium/crypto_pwhash/crypto_pwhash.c +++ b/src/libsodium/crypto_pwhash/crypto_pwhash.c @@ -4,6 +4,10 @@ #include "crypto_pwhash.h" +#if SIZE_MAX < crypto_pwhash_MEMLIMIT_MAX +# error Password hashing functions cannot be used on this platform +#endif + int crypto_pwhash_alg_argon2i13(void) {