From 9a2a278715dd2ded73ba5850861670e33894dd20 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 26 Nov 2015 18:21:31 +0100 Subject: [PATCH] Use memset() instead of a cast --- .../crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c b/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c index 0968ba04..1ece476e 100644 --- a/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +++ b/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c @@ -782,7 +782,7 @@ crypto_aead_aes256gcm_decrypt_afternm(unsigned char *m, unsigned long long *mlen return -1; } } - *(uint32_t *) &n2[12] = 0; + memset(&n2[12], 0, sizeof (uint32_t)); COUNTER_INC2(n2); LOOPDRND128; LOOPDRMD128;