forked from wolfSSL/wolfssl
fixes for cppcheck uninitvar src/pk.c (false positives) and nullPointerRedundantCheck in src/ssl_load.c (true positive).
This commit is contained in:
4
src/pk.c
4
src/pk.c
@@ -16198,7 +16198,7 @@ int wolfSSL_PEM_write_bio_PKCS8PrivateKey(WOLFSSL_BIO* bio,
|
|||||||
int passwdSz, wc_pem_password_cb* cb, void* ctx)
|
int passwdSz, wc_pem_password_cb* cb, void* ctx)
|
||||||
{
|
{
|
||||||
byte* pem = NULL;
|
byte* pem = NULL;
|
||||||
int pemSz;
|
int pemSz = 0;
|
||||||
int res = 1;
|
int res = 1;
|
||||||
|
|
||||||
/* Validate parameters. */
|
/* Validate parameters. */
|
||||||
@@ -16243,7 +16243,7 @@ int wolfSSL_PEM_write_PKCS8PrivateKey(XFILE f, WOLFSSL_EVP_PKEY* pkey,
|
|||||||
wc_pem_password_cb* cb, void* ctx)
|
wc_pem_password_cb* cb, void* ctx)
|
||||||
{
|
{
|
||||||
byte* pem = NULL;
|
byte* pem = NULL;
|
||||||
int pemSz;
|
int pemSz = 0;
|
||||||
int res = 1;
|
int res = 1;
|
||||||
|
|
||||||
/* Validate parameters. */
|
/* Validate parameters. */
|
||||||
|
@@ -1529,7 +1529,7 @@ static void ProcessBufferCertSetHave(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
|
|||||||
if (ssl != NULL) {
|
if (ssl != NULL) {
|
||||||
ssl->pkCurveOID = cert->pkCurveOID;
|
ssl->pkCurveOID = cert->pkCurveOID;
|
||||||
}
|
}
|
||||||
else {
|
else if (ctx) {
|
||||||
ctx->pkCurveOID = cert->pkCurveOID;
|
ctx->pkCurveOID = cert->pkCurveOID;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1540,7 +1540,7 @@ static void ProcessBufferCertSetHave(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
|
|||||||
if (ssl != NULL) {
|
if (ssl != NULL) {
|
||||||
ssl->options.haveECC = ssl->options.haveECDSAsig;
|
ssl->options.haveECC = ssl->options.haveECDSAsig;
|
||||||
}
|
}
|
||||||
else {
|
else if (ctx) {
|
||||||
ctx->haveECC = ctx->haveECDSAsig;
|
ctx->haveECC = ctx->haveECDSAsig;
|
||||||
}
|
}
|
||||||
#endif /* !WC_STRICT_SIG */
|
#endif /* !WC_STRICT_SIG */
|
||||||
|
Reference in New Issue
Block a user