forked from wolfSSL/wolfssl
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. */
|
closed and the endpoint wants to check for an alert sent by the other end. */
|
||||||
int ProcessReplyEx(WOLFSSL* ssl, int allowSocketErr)
|
int ProcessReplyEx(WOLFSSL* ssl, int allowSocketErr)
|
||||||
{
|
{
|
||||||
int ret = 0, type, readSz;
|
int ret = 0, type = internal_error, readSz;
|
||||||
int atomicUser = 0;
|
int atomicUser = 0;
|
||||||
word32 startIdx = 0;
|
word32 startIdx = 0;
|
||||||
#if defined(WOLFSSL_DTLS)
|
#if defined(WOLFSSL_DTLS)
|
||||||
|
@ -22133,7 +22133,7 @@ static int SetEccPublicKey(byte* output, ecc_key* key, int outLen,
|
|||||||
idx += algoSz;
|
idx += algoSz;
|
||||||
/* curve */
|
/* curve */
|
||||||
if (output)
|
if (output)
|
||||||
(void)SetCurve(key, output + idx, outLen - idx);
|
(void)SetCurve(key, output + idx, curveSz);
|
||||||
idx += curveSz;
|
idx += curveSz;
|
||||||
/* bit string */
|
/* bit string */
|
||||||
if (output)
|
if (output)
|
||||||
@ -22157,7 +22157,7 @@ static int SetEccPublicKey(byte* output, ecc_key* key, int outLen,
|
|||||||
word32 pubSz = 0;
|
word32 pubSz = 0;
|
||||||
int sz = 0;
|
int sz = 0;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int curveIdSz;
|
int curveIdSz = 0;
|
||||||
byte* curveOid = NULL;
|
byte* curveOid = NULL;
|
||||||
|
|
||||||
/* Check key validity. */
|
/* Check key validity. */
|
||||||
@ -29306,7 +29306,7 @@ static int wc_BuildEccKeyDer(ecc_key* key, byte* output, word32 *inLen,
|
|||||||
word32 privSz, pubSz;
|
word32 privSz, pubSz;
|
||||||
int sz = 0;
|
int sz = 0;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int curveIdSz;
|
int curveIdSz = 0;
|
||||||
|
|
||||||
/* Check validity of parameters. */
|
/* Check validity of parameters. */
|
||||||
if ((key == NULL) || ((output == NULL) && (inLen == NULL))) {
|
if ((key == NULL) || ((output == NULL) && (inLen == NULL))) {
|
||||||
|
Reference in New Issue
Block a user