diff --git a/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c b/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c index 71f33654..92f068f6 100644 --- a/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +++ b/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c @@ -527,7 +527,7 @@ crypto_aead_aes256gcm_encrypt_afternm(unsigned char *c, unsigned long long *clen (void) nsec; memcpy(H, ctx->H, sizeof H); - if (mlen > 16ULL * (1ULL << 32)) { + if (mlen > 16ULL * ((1ULL << 32) - 2)) { abort(); /* LCOV_EXCL_LINE */ } memcpy(&n2[0], npub, 3 * 4);