mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
Fix SetCurve max sizes. Add fix for potentially uninitialized type in ProcessReplyEx.
This commit is contained in:
@ -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)
|
||||
|
@ -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))) {
|
||||
|
Reference in New Issue
Block a user