From a161dd9fa10fb316ae27ca62d1da2cf0edd4c5c9 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 17 Sep 2017 16:31:05 +0200 Subject: [PATCH] On 32-bit systems, the limit is SIZE_MAX --- .../include/sodium/crypto_secretstream_xchacha20poly1305.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsodium/include/sodium/crypto_secretstream_xchacha20poly1305.h b/src/libsodium/include/sodium/crypto_secretstream_xchacha20poly1305.h index 08b4f89c..7d3fa2a9 100644 --- a/src/libsodium/include/sodium/crypto_secretstream_xchacha20poly1305.h +++ b/src/libsodium/include/sodium/crypto_secretstream_xchacha20poly1305.h @@ -30,7 +30,7 @@ SODIUM_EXPORT size_t crypto_secretstream_xchacha20poly1305_keybytes(void); #define crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX \ - (((1ULL << 32) - 2ULL) * 64ULL) + SODIUM_MIN(SODIUM_SIZE_MAX, ((1ULL << 32) - 2ULL) * 64ULL) SODIUM_EXPORT size_t crypto_secretstream_xchacha20poly1305_messagebytes_max(void);