From f25d7aa4f144a4c83c671c4d0ee550ee74767b9a Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 13 May 2014 10:41:55 -0700 Subject: [PATCH] Add an extra static assertion --- src/libsodium/crypto_secretbox/crypto_secretbox_easy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c b/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c index 9d03860f..fd6508df 100644 --- a/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c +++ b/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c @@ -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;