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

Address several issues with the ultimate goal being to fix Coverity cited problems #241

Merged
merged 4 commits into from
Jul 12, 2024

Conversation

ngie-eign
Copy link
Contributor

@ngie-eign ngie-eign commented Jun 6, 2024

  • Update .gitignore to ignore more build generated files.
  • Fix typos (the the -> the).
  • Fix a memory leak.
  • Fix a bad type/potential unsigned integer overflow issue.

ngie-eign added 4 commits June 5, 2024 22:31
This change ignores several files which are generated by autotools, et
al.

Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
Prior to this change `dsasig` was not freed when calling `DSA_SIG_set0`
failed. Free `dsasig` on error in that code path now.

Reported by:	Coverity
Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
Both `i` and `n` should match the return type for `sk_X509_num` (which
is `int`, not `size_t`). This addresses a potential issue where
`sk_X509_num(..)` could return -1, resulting in an unnecessary number of
loop iterations and undesirable behavior.

Reported by:	Coverity
Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
@wcawijngaards
Copy link
Member

This set of changes looks nice to me. Unbound has similar issues, because it has the same code in certain places, it needs the memory leak fix and some of the spelling fixes. I have created commits to the unbound code base to fix them, in NLnetLabs/unbound@3cad581 and NLnetLabs/unbound@1974732 .

@ngie-eign
Copy link
Contributor Author

This set of changes looks nice to me. Unbound has similar issues, because it has the same code in certain places, it needs the memory leak fix and some of the spelling fixes. I have created commits to the unbound code base to fix them, in NLnetLabs/unbound@3cad581 and NLnetLabs/unbound@1974732 .

Much appreciated! I looked at those PRs -- do I need to submit entries to the ChangeLog as well for the proposed changes, or is that something maintainers can handle?

@wtoorop
Copy link
Member

wtoorop commented Jun 7, 2024

Much appreciated! I looked at those PRs -- do I need to submit entries to the ChangeLog as well for the proposed changes, or is that something maintainers can handle?

I should be able to handle that 😁 . How would you prefer to be credited? As ngie-eign or with your full name.
Cheers!

@ngie-eign
Copy link
Contributor Author

]

Much appreciated! I looked at those PRs -- do I need to submit entries to the ChangeLog as well for the proposed changes, or is that something maintainers can handle?

I should be able to handle that 😁 . How would you prefer to be credited? As ngie-eign or with your full name. Cheers!

Thanks! Could you please use my legal name (Enji Cooper) :)?

Copy link
Member

@wtoorop wtoorop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks fine. Thanks.

@wtoorop wtoorop merged commit 2e02581 into NLnetLabs:develop Jul 12, 2024
2 checks passed
wtoorop added a commit that referenced this pull request Jul 12, 2024
@ngie-eign ngie-eign deleted the coverity-fixes branch July 12, 2024 12:34
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