-
Notifications
You must be signed in to change notification settings - Fork 94
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
Backport a few fixes for issues detected by Coverity #421
Draft
stefanberger
wants to merge
8
commits into
stable-0.9
Choose a base branch
from
stable-0.9.next
base: stable-0.9
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
Signed-off-by: Stefan Berger <[email protected]>
… (Coverity) Resolve the following Coverity complaint: "Using uninitialized value eccPublic when calling TPMS_ECC_POINT_Unmarshal." Signed-off-by: Stefan Berger <[email protected]>
Resolve the following Coverity complaint by removing assignment to offset: "Assigning value from offset + 148UL to offset here, but that stored value is overwritten before it can be used." Signed-off-by: Stefan Berger <[email protected]>
Resolve the following Coverity complaint: "Expression command->sessionNum - 1U, which is equal to 4294967295, where command->sessionNum is known to be equal to 0, underflows the type that receives it, an unsigned integer 32 bits wide." Signed-off-by: Stefan Berger <[email protected]>
…verity) Address the following Coverity complaint (1550494) by filtering out bad input values: "Expression i--, which is equal to 65535, where i is known to be equal to 0, underflows the type that receives it, an unsigned integer 16 bits wide." aSize is typcially 2048 and n is always >= 1 per the input parameter. Therefore no side-effects are expected from this filter. Signed-off-by: Stefan Berger <[email protected]>
Cast the '1' to UINT64 before shifting it. Since the shift value is always below 32 it would have never exceeded the 32bit value it was using before the cast. Signed-off-by: Stefan Berger <[email protected]>
Address a false positive issue detect by Coverity (CID 1517797) about *buflen. Per this assignment of buflen cached_blobs[st].buflen = buffer ? buflen : BUFLEN_EMPTY_BUFFER; the following is true: If cached_blobs[].buffer is NULL then *buflen = BUFLEN_EMPTY_BUFFER If cached_blobs[].buffer is not NULL then *buflen != BUFLEN_EMPTY_BUFFER Signed-off-by: Stefan Berger <[email protected]>
Since swtpm now depends on libtpms >= 0.10 use swtpm's stable-0.9 branch for testing. Signed-off-by: Stefan Berger <[email protected]>
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.
No description provided.