diff --git a/src/internal.c b/src/internal.c index 11fae7b91..98286ba8c 100644 --- a/src/internal.c +++ b/src/internal.c @@ -17957,7 +17957,7 @@ int ProcessReply(WOLFSSL* ssl) closed and the endpoint wants to check for an alert sent by the other end. */ int ProcessReplyEx(WOLFSSL* ssl, int allowSocketErr) { - int ret = 0, type, readSz; + int ret = 0, type = internal_error, readSz; int atomicUser = 0; word32 startIdx = 0; #if defined(WOLFSSL_DTLS) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 591c53a94..ea212c2fe 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -22133,7 +22133,7 @@ static int SetEccPublicKey(byte* output, ecc_key* key, int outLen, idx += algoSz; /* curve */ if (output) - (void)SetCurve(key, output + idx, outLen - idx); + (void)SetCurve(key, output + idx, curveSz); idx += curveSz; /* bit string */ if (output) @@ -22157,7 +22157,7 @@ static int SetEccPublicKey(byte* output, ecc_key* key, int outLen, word32 pubSz = 0; int sz = 0; int ret = 0; - int curveIdSz; + int curveIdSz = 0; byte* curveOid = NULL; /* Check key validity. */ @@ -29306,7 +29306,7 @@ static int wc_BuildEccKeyDer(ecc_key* key, byte* output, word32 *inLen, word32 privSz, pubSz; int sz = 0; int ret = 0; - int curveIdSz; + int curveIdSz = 0; /* Check validity of parameters. */ if ((key == NULL) || ((output == NULL) && (inLen == NULL))) {