8000 Fix some bugs caught by UBscan by ethomson · Pull Request #6700 · libgit2/libgit2 · GitHub
[go: up one dir, main page]

Skip to content

Fix some bugs caught by UBscan #6700

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

Merged
merged 3 commits into from
Dec 20, 2023
Merged

Fix some bugs caught by UBscan #6700

merged 3 commits into from
Dec 20, 2023

Conversation

ethomson
Copy link
Member

After upgrading the undefined behavior scanner to LLVM 14, we see some warnings reported. These warnings are correct; this PR fixes them.

Passing a function pointer with different parameters is UB, even if
those params are (void *). Use our separate `_cb` functions that will do
the correct casting.
`git_commit_create_v` takes _commits_ not _commit ids_. Fix the test to
call the API correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0