mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Add an extra static assertion
This commit is contained in:
@@ -62,6 +62,8 @@ crypto_secretbox_open_easy(unsigned char *m, const unsigned char *c,
|
||||
size_t m_boxed_len;
|
||||
int rc;
|
||||
|
||||
(void) sizeof(int[crypto_secretbox_BOXZEROBYTES + crypto_secretbox_MACBYTES
|
||||
== crypto_secretbox_ZEROBYTES]);
|
||||
if (clen < crypto_secretbox_MACBYTES ||
|
||||
clen > SIZE_MAX - crypto_secretbox_BOXZEROBYTES) {
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user