From 12023defc810c8637f9b390522362721d8a9437e Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 16 Nov 2022 13:32:16 +0100 Subject: [PATCH] salsa20: initialize partial block A compiler trying to be too smart could notice that we are shifting ununitialized data (even though we then discard it), and apply unwanted optimizations. --- src/libsodium/crypto_stream/salsa20/xmm6int/u0.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsodium/crypto_stream/salsa20/xmm6int/u0.h b/src/libsodium/crypto_stream/salsa20/xmm6int/u0.h index 830f70e8..2bc527d0 100644 --- a/src/libsodium/crypto_stream/salsa20/xmm6int/u0.h +++ b/src/libsodium/crypto_stream/salsa20/xmm6int/u0.h @@ -5,7 +5,7 @@ if (bytes > 0) { __m128i diag3 = _mm_loadu_si128((const __m128i *) (x + 12)); __m128i a0, a1, a2, a3, a4, a5, a6, a7; __m128i b0, b1, b2, b3, b4, b5, b6, b7; - uint8_t partialblock[64]; + uint8_t partialblock[64] = { 0 }; unsigned int i;