From f9169ac55bc17004b196dfd355724e03796aa6bd Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 14 Nov 2015 16:56:47 +0100 Subject: [PATCH] Add a compile-time size check --- src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c b/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c index f8c8b794..f5f545a7 100644 --- a/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c +++ b/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c @@ -620,6 +620,8 @@ static int crypto_onetimeauth_poly1305_sse2_init(crypto_onetimeauth_poly1305_state *state, const unsigned char *key) { + (void) sizeof(int[sizeof (crypto_onetimeauth_poly1305_state) >= + sizeof (poly1305_state_internal_t) ? 1 : -1]); poly1305_init_ext((poly1305_state_internal_t *)(void *) state, key, 0U); return 0;