Add an extra static assertion
This commit is contained in:
parent
3ca303075d
commit
f25d7aa4f1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user