Skip to content

Commit 5bffbdb

Browse files
author
gojimmypi
committed
Initialize some Kyber client variables
1 parent 716870c commit 5bffbdb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

wolfcrypt/src/wc_kyber.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ int wc_KyberKey_MakeKeyWithRandom(KyberKey* key, const unsigned char* rand,
203203
byte* pubSeed = buf;
204204
byte* noiseSeed = buf + KYBER_SYM_SZ;
205205
sword16* a = NULL;
206-
sword16* e;
206+
sword16* e = NULL;
207207
int ret = 0;
208208
int kp = 0;
209209

@@ -528,7 +528,7 @@ int wc_KyberKey_EncapsulateWithRandom(KyberKey* key, unsigned char* ct,
528528
byte msg[2 * KYBER_SYM_SZ];
529529
byte kr[2 * KYBER_SYM_SZ + 1];
530530
int ret = 0;
531-
unsigned int ctSz;
531+
unsigned int ctSz = 0;
532532

533533
/* Validate parameters. */
534534
if ((key == NULL) || (ct == NULL) || (ss == NULL) || (rand == NULL)) {
@@ -742,8 +742,8 @@ int wc_KyberKey_Decapsulate(KyberKey* key, unsigned char* ss,
742742
byte kr[2 * KYBER_SYM_SZ + 1];
743743
int ret = 0;
744744
unsigned int ctSz = 0;
745-
unsigned int i;
746-
int fail;
745+
unsigned int i = 0;
746+
int fail = 0;
747747
#ifndef USE_INTEL_SPEEDUP
748748
byte* cmp = NULL;
749749
#else

0 commit comments

Comments
 (0)