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

Coverity fixes #7733

Merged
merged 1 commit into from
Jul 10, 2024
Merged

Coverity fixes #7733

merged 1 commit into from
Jul 10, 2024

Conversation

SparkiDev
Copy link
Contributor

Description

pk.c:
EncryptDerKey - setting wrong ret value on allocation failure.
wolfssl_rsa_generate_key_native - now checks e is a valid long before passing in.
Fix formatting.

ssl_load.c:
ProcessBufferPrivPkcs8Dec - now checking password is not NULL before zeroizing. Allocation may fail and ForceZero doesn't check for NULL.
Fix formatting.

tests/api.c:
test_RsaSigFailure_cm - Check cert_sz is greater than zero before use.
send_new_session_ticket - assert that building the message doesn't return error or 0.
test_ticket_nonce_malloc - fix setting of medium and big to use preprocessor. Fix big to be medium + 20.

asn.c:
GetLength_ex - Fix type of bytes so that it can go negative.

sp_int.h:
sp_clamp - add one to ii while it is a signed.
Fix formatting.

Testing

Standard testing.

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@SparkiDev SparkiDev self-assigned this Jul 10, 2024
@SparkiDev SparkiDev force-pushed the coverity_3 branch 3 times, most recently from 9ef0168 to ac05caa Compare July 10, 2024 01:38
pk.c:
	EncryptDerKey - setting wrong ret value on allocation failure.
	wolfssl_rsa_generate_key_native - now checks e is a valid long
before passing in.
	Fix formatting.

ssl_load.c:
	ProcessBufferPrivPkcs8Dec - now checking password is not NULL
before zeroizing. Allocation may fail and ForceZero doesn't check for
NULL.
	Fix formatting.

tests/api.c:
	test_RsaSigFailure_cm - Check cert_sz is greater than zero
before use.
	send_new_session_ticket - assert that building the message
doesn't return error or 0.
	test_ticket_nonce_malloc - fix setting of medium and big to use
preprocessor. Fix big to be medium + 20.

asn.c:
	GetLength_ex - Fix type of bytes so that it can go negative.

sp_int.h:
	sp_clamp - add one to ii while it is a signed.
	Fix formatting.
@JacobBarthelmeh JacobBarthelmeh merged commit 2046687 into wolfSSL:master Jul 10, 2024
120 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants