forked from wolfSSL/wolfssl
fix static analysis warnings
This commit is contained in:
@@ -1299,6 +1299,9 @@ int ecc_make_key(RNG* rng, int keysize, ecc_key* key)
|
|||||||
{
|
{
|
||||||
int x, err;
|
int x, err;
|
||||||
|
|
||||||
|
if (key == NULL || rng == NULL)
|
||||||
|
return ECC_BAD_ARG_E;
|
||||||
|
|
||||||
/* find key size */
|
/* find key size */
|
||||||
for (x = 0; (keysize > ecc_sets[x].size) && (ecc_sets[x].size != 0); x++)
|
for (x = 0; (keysize > ecc_sets[x].size) && (ecc_sets[x].size != 0); x++)
|
||||||
;
|
;
|
||||||
|
@@ -2036,7 +2036,6 @@ int CyaSSL_Init(void)
|
|||||||
XFREE(der.buffer, heap, dynamicType);
|
XFREE(der.buffer, heap, dynamicType);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
ret = 0; /* back to good status */
|
|
||||||
|
|
||||||
if (XSTRNCMP(info.name, "DES-CBC", 7) == 0) {
|
if (XSTRNCMP(info.name, "DES-CBC", 7) == 0) {
|
||||||
Des enc;
|
Des enc;
|
||||||
@@ -7823,7 +7822,7 @@ int CyaSSL_set_compression(CYASSL* ssl)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buf != NULL) {
|
if (buf != NULL && text != NULL) {
|
||||||
textSz = min(textSz, len);
|
textSz = min(textSz, len);
|
||||||
XMEMCPY(buf, text, textSz);
|
XMEMCPY(buf, text, textSz);
|
||||||
buf[textSz] = '\0';
|
buf[textSz] = '\0';
|
||||||
|
@@ -550,6 +550,9 @@ int TLS_hmac(CYASSL* ssl, byte* digest, const byte* in, word32 sz,
|
|||||||
Hmac hmac;
|
Hmac hmac;
|
||||||
int ret;
|
int ret;
|
||||||
byte myInner[CYASSL_TLS_HMAC_INNER_SZ];
|
byte myInner[CYASSL_TLS_HMAC_INNER_SZ];
|
||||||
|
|
||||||
|
if (ssl == NULL)
|
||||||
|
return BAD_FUNC_ARG;
|
||||||
|
|
||||||
CyaSSL_SetTlsHmacInner(ssl, myInner, sz, content, verify);
|
CyaSSL_SetTlsHmacInner(ssl, myInner, sz, content, verify);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user