-
Notifications
You must be signed in to change notification settings - Fork 830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minor fixes for Coverity reports #8094
Conversation
a394c6e
to
e83a36e
Compare
Retest this please Jenkins. Possible network timeout: PRB-single-flag.txt_95
|
@@ -14111,7 +14111,9 @@ int wolfSSL_X509_check_ip_asc(WOLFSSL_X509 *x, const char *ipasc, | |||
} | |||
|
|||
#ifdef WOLFSSL_SMALL_STACK | |||
XFREE(dCert, x->heap, DYNAMIC_TYPE_DCERT); | |||
if (dCert != NULL) { | |||
XFREE(dCert, x->heap, DYNAMIC_TYPE_DCERT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm -- why are you reverting d350ba6 here? Is there something special about this use of XFREE()
according to Coverity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, I should have checked x for null here not dCert
wolfcrypt/src/aes.c
Outdated
#ifdef WOLFSSL_SMALL_STACK | ||
wc_AesDelete(aes, NULL); | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This call isn't needed -- whenever wc_AesNew()
sets ret
to nonzero, it always returns NULL
, and there is nothing to free.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
likely a false positive then, I missed that the return would always be null if ret is set to nonzero
e83a36e
to
18150a1
Compare
ret = wc_InitRng(&rng); | ||
#endif | ||
if (ret != 0) | ||
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), cleanup); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops, need to actually return WC_TEST_RET_ENC_EC(ret)
here, since cleanup:
will wc_FreeRng()
unconditionally.
minor fixes for Coverity reports