From d89974c5c6bdb9083693638014106a41cb6d022d Mon Sep 17 00:00:00 2001 From: George Kadianakis Date: Thu, 17 Dec 2020 13:49:17 +0200 Subject: Fix Keccak undefined behavior on exotic platforms. Bug reported and diagnosed in: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=975977 Fixes bug #40210. --- src/ext/keccak-tiny/keccak-tiny.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ext/keccak-tiny') diff --git a/src/ext/keccak-tiny/keccak-tiny.h b/src/ext/keccak-tiny/keccak-tiny.h index a9c8ed6420..dd26386a9a 100644 --- a/src/ext/keccak-tiny/keccak-tiny.h +++ b/src/ext/keccak-tiny/keccak-tiny.h @@ -21,7 +21,7 @@ typedef struct keccak_state { size_t offset; uint8_t finalized : 1; -} keccak_state; +} __attribute__((aligned(8))) keccak_state; /* Initialize a Keccak instance suitable for SHA-3 hash functions. */ int keccak_digest_init(keccak_state *s, size_t bits); -- cgit v1.2.3-54-g00ecf