fix static analysis warnings
This commit is contained in:
parent
2cf3564d1e
commit
09a7a087a2
@ -1299,6 +1299,9 @@ int ecc_make_key(RNG* rng, int keysize, ecc_key* key)
|
||||
{
|
||||
int x, err;
|
||||
|
||||
if (key == NULL || rng == NULL)
|
||||
return ECC_BAD_ARG_E;
|
||||
|
||||
/* find key size */
|
||||
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);
|
||||
return ret;
|
||||
}
|
||||
ret = 0; /* back to good status */
|
||||
|
||||
if (XSTRNCMP(info.name, "DES-CBC", 7) == 0) {
|
||||
Des enc;
|
||||
@ -7823,7 +7822,7 @@ int CyaSSL_set_compression(CYASSL* ssl)
|
||||
break;
|
||||
}
|
||||
|
||||
if (buf != NULL) {
|
||||
if (buf != NULL && text != NULL) {
|
||||
textSz = min(textSz, len);
|
||||
XMEMCPY(buf, text, textSz);
|
||||
buf[textSz] = '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user