Skip to content
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

Merged
merged 3 commits into from
Oct 23, 2024
Merged

Conversation

JacobBarthelmeh
Copy link
Contributor

minor fixes for Coverity reports

@JacobBarthelmeh
Copy link
Contributor Author

JacobBarthelmeh commented Oct 21, 2024

Retest this please Jenkins. Possible network timeout: PRB-single-flag.txt_95

SSL curve name is SECP256R1

Unexpected server result

removing ready file: /tmp/workspace/PRB-generic-config-parser/wolfssl/tmp.l0SKcXeQK1/wolf_ocsp_s2_readyF1162286

removing ready file: /tmp/workspace/PRB-generic-config-parser/wolfssl/tmp.l0SKcXeQK1/wolf_ocsp_s2_readyF2162286

removing ready file: /tmp/workspace/PRB-generic-config-parser/wolfssl/tmp.l0SKcXeQK1/wolf_ocsp_s2_readyF3162286

removing ready file: /tmp/workspace/PRB-generic-config-parser/wolfssl/tmp.l0SKcXeQK1/wolf_ocsp_s2_readyF4162286

removing ready file: /tmp/workspace/PRB-generic-config-parser/wolfssl/tmp.l0SKcXeQK1/wolf_ocsp_s2_readyF5162286

retrying...

FAIL scripts/ocsp-stapling_tls13multi.test (exit status: 143)

<<<

Error: Test runtime=4603sec. Make Check RESULT = 2

Exiting with status: 1

Script ran for 5167 seconds.

script returned exit code 1

@@ -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);
Copy link
Contributor

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?

Copy link
Contributor Author

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

Comment on lines 10535 to 10537
#ifdef WOLFSSL_SMALL_STACK
wc_AesDelete(aes, NULL);
#endif
Copy link
Contributor

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.

Copy link
Contributor Author

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

ret = wc_InitRng(&rng);
#endif
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), cleanup);
Copy link
Contributor

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.

@douzzer douzzer merged commit 6e14889 into wolfSSL:master Oct 23, 2024
141 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants