-
Notifications
You must be signed in to change notification settings - Fork 368
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 scan #2782
Merged
JuergenReppSIT
merged 22 commits into
tpm2-software:coverity_scan
from
JuergenReppSIT:coverity_scan
Feb 27, 2024
Merged
Coverity scan #2782
JuergenReppSIT
merged 22 commits into
tpm2-software:coverity_scan
from
JuergenReppSIT:coverity_scan
Feb 27, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dead code is removed in Esys_NV_ChangeAuth.c and Esys_ObjectChangeAuth.c Signed-off-by: Juergen Repp <[email protected]>
Duplicate statement is removed. Signed-off-by: Juergen Repp <[email protected]>
If and error does occur in the openssl crypto functions the context is not freed. Signed-off-by: Juergen Repp <[email protected]>
The size of the size field was added to the buffer size. Signed-off-by: Juergen Repp <[email protected]>
The crypto context is now freed in error cases. Signed-off-by: Juergen Repp <[email protected]>
A fallthrough after a return is removed. Signed-off-by: Juergen Repp <[email protected]>
In an error case the variables public, name, and qualifiedName were not freed. Signed-off-by: Juergen Repp <[email protected]>
A return value was not assigned but checked afterwards. Signed-off-by: Juergen Repp <[email protected]>
A falltrhough which can't be reached is removed. Signed-off-by: Juergen Repp <[email protected]>
The possible return value -1 is now checked. Signed-off-by: Juergen Repp <[email protected]>
The variable int_ca_file was used after return_try_again. Now the value of the corresponding environment variable is used. Signed-off-by: Juergen Repp <[email protected]>
As destination field now sha512 instead of sha1 is used. Signed-off-by: Juergen Repp <[email protected]>
Returns were exchanged with goto error. Signed-off-by: Juergen Repp <[email protected]>
It's now checked whether the complete ima header is read. Signed-off-by: Juergen Repp <[email protected]>
The function file_to_buffer did not close fp in error cases. Signed-off-by: Juergen Repp <[email protected]>
The wrong size was used to clear the memory if the field was not found. Signed-off-by: Juergen Repp <[email protected]>
The IMA parser did not check the length field for the ima type. Signed-off-by: Juergen Repp <[email protected]>
Ther was no else case in the receive function when the header was not received but afterwards the partial_size was unmarshalled from header. Now TSS2_TCTI_RC_GENERAL_FAILURE is returned in this case. Signed-off-by: Juergen Repp <[email protected]>
The return code of the authorization function for a signing key was not checked. Signed-off-by: Juergen Repp <[email protected]>
The wrong size variable was used to check the out of bound access. Signed-off-by: Juergen Repp <[email protected]>
* In the cleanup function for an ossl hash context the variables were not checked before calling the ossl cleanup functions. * An unneded cast was removed. Signed-off-by: Juergen Repp <[email protected]>
c09666d
into
tpm2-software:coverity_scan
20 of 21 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
for coverity