Skip to content

Commit db3873f

Browse files
Merge pull request #7172 from bandi13/fixUninitVar
Fix compilation errors about uninitialized variables
2 parents 578735e + 4971b9a commit db3873f

4 files changed

Lines changed: 93 additions & 93 deletions

File tree

examples/asn1/asn1.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ static int FindPem(unsigned char* data, word32 offset, word32 len,
180180
word32* start, word32* end)
181181
{
182182
int ret = 0;
183-
word32 i;
184-
word32 j;
183+
word32 i = 0;
184+
word32 j = 0;
185185

186186
/* Find header. */
187187
for (i = offset; i < len; i++) {

src/tls13.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4724,8 +4724,8 @@ static int EchCheckAcceptance(WOLFSSL* ssl, const byte* input,
47244724
int serverRandomOffset, int helloSz)
47254725
{
47264726
int ret = 0;
4727-
int digestType;
4728-
int digestSize;
4727+
int digestType = 0;
4728+
int digestSize = 0;
47294729
HS_Hashes* tmpHashes;
47304730
HS_Hashes* acceptHashes;
47314731
byte zeros[WC_MAX_DIGEST_SIZE];
@@ -4857,10 +4857,10 @@ static int EchWriteAcceptance(WOLFSSL* ssl, byte* output,
48574857
int serverRandomOffset, int helloSz)
48584858
{
48594859
int ret = 0;
4860-
int digestType;
4861-
int digestSize;
4862-
HS_Hashes* tmpHashes;
4863-
HS_Hashes* acceptHashes;
4860+
int digestType = 0;
4861+
int digestSize = 0;
4862+
HS_Hashes* tmpHashes = NULL;
4863+
HS_Hashes* acceptHashes = NULL;
48644864
byte zeros[WC_MAX_DIGEST_SIZE];
48654865
byte transcriptEchConf[WC_MAX_DIGEST_SIZE];
48664866
byte expandLabelPrk[WC_MAX_DIGEST_SIZE];

0 commit comments

Comments
 (0)