mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-20 02:25:14 -07:00
aes256gcm_encrypt_afternm() - abort() if mlen > 2^39-256 bits
This commit is contained in:
parent
113091b2a0
commit
aa2ae5642b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user