Fix SetCurve max sizes. Add fix for potentially uninitialized type in ProcessReplyEx.

This commit is contained in:
Kareem
2022-07-01 10:43:13 -07:00
parent 7a7d8d170d
commit 96aedc2f47
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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))) {