Merge pull request #8953 from philljj/fedora_linuxkm_uninit_errors

linuxkm fedora: fix uninitialized build errors.
This commit is contained in:
Daniel Pouzzner
2025-07-02 14:20:26 -05:00
committed by GitHub
3 changed files with 9 additions and 6 deletions

View File

@@ -1022,7 +1022,7 @@ static int camellia_setup256(const unsigned char *key, u32 *subkey)
static int camellia_setup192(const unsigned char *key, u32 *subkey)
{
unsigned char kk[32];
u32 krll, krlr, krrl,krrr;
u32 krll = 0, krlr = 0, krrl = 0, krrr = 0;
XMEMCPY(kk, key, 24);
XMEMCPY((unsigned char *)&krll, key+16,4);

View File

@@ -1677,7 +1677,7 @@
static void DesProcessBlock(Des* des, const byte* in, byte* out)
{
word32 l, r;
word32 l = 0, r = 0;
XMEMCPY(&l, in, sizeof(l));
XMEMCPY(&r, in + sizeof(l), sizeof(r));
@@ -1700,7 +1700,7 @@
static void Des3ProcessBlock(Des3* des, const byte* in, byte* out)
{
word32 l, r;
word32 l = 0, r = 0;
XMEMCPY(&l, in, sizeof(l));
XMEMCPY(&r, in + sizeof(l), sizeof(r));

View File

@@ -1009,9 +1009,12 @@ WC_MISC_STATIC WC_INLINE void ato64(const byte *in, w64wrapper *w64)
#ifdef BIG_ENDIAN_ORDER
XMEMCPY(&w64->n, in, sizeof(w64->n));
#else
word64 _in;
XMEMCPY(&_in, in, sizeof(_in));
w64->n = ByteReverseWord64(_in);
union {
word64 w;
byte b[sizeof(word64)];
} _in;
XMEMCPY(_in.b, in, sizeof(_in));
w64->n = ByteReverseWord64(_in.w);
#endif /* BIG_ENDIAN_ORDER */
}