Skip to content

minor fixes for Coverity reports#8094

Merged
douzzer merged 3 commits intowolfSSL:masterfrom
JacobBarthelmeh:coverity
Oct 23, 2024
Merged

minor fixes for Coverity reports#8094
douzzer merged 3 commits intowolfSSL:masterfrom
JacobBarthelmeh:coverity

Conversation

@JacobBarthelmeh
Copy link
Copy Markdown
Contributor

minor fixes for Coverity reports

@JacobBarthelmeh
Copy link
Copy Markdown
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

@JacobBarthelmeh JacobBarthelmeh added the For This Release Release version 5.9.1 label Oct 21, 2024
Comment thread src/x509.c
#ifdef WOLFSSL_SMALL_STACK
XFREE(dCert, x->heap, DYNAMIC_TYPE_DCERT);
if (dCert != NULL) {
XFREE(dCert, x->heap, DYNAMIC_TYPE_DCERT);
Copy link
Copy Markdown
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
Copy Markdown
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 thread wolfcrypt/src/aes.c Outdated
Comment on lines +10535 to +10537
#ifdef WOLFSSL_SMALL_STACK
wc_AesDelete(aes, NULL);
#endif
Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread wolfcrypt/test/test.c Outdated
ret = wc_InitRng(&rng);
#endif
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), cleanup);
Copy link
Copy Markdown
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For This Release Release version 5.9.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants