From a1fa897572782b3afa450e37526cc392fec7a00f Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Thu, 3 Jul 2025 10:17:51 -0500 Subject: [PATCH] wolfcrypt/src/dilithium.c: fix cast flubs in dilithium_encode_gamma1_19_bits() (fixes quantum-safe-wolfssl-all-gcc-latest-m32). --- wolfcrypt/src/dilithium.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/src/dilithium.c b/wolfcrypt/src/dilithium.c index 0a48ab26d..c9eebcdc4 100644 --- a/wolfcrypt/src/dilithium.c +++ b/wolfcrypt/src/dilithium.c @@ -1386,8 +1386,8 @@ static void dilithium_encode_gamma1_19_bits(const sword32* z, byte* s) ((word64)z2 << 40) | ((word64)z3 << 60); #else word32* s32p = (word32*)s; - s32p[0] = (word16)( z0 | (z1 << 20) ); - s32p[1] = (word16)((z1 >> 12) | (z2 << 8) | (z3 << 28)); + s32p[0] = (word32)( z0 | (z1 << 20) ); + s32p[1] = (word32)((z1 >> 12) | (z2 << 8) | (z3 << 28)); #endif s16p[4] = (word16)((z3 >> 4) ); #else