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

Check git_signature_dup failure #5817

Merged
merged 1 commit into from
Mar 4, 2021
Merged

Check git_signature_dup failure #5817

merged 1 commit into from
Mar 4, 2021

Conversation

mamapanda
Copy link
Contributor

I figured these calls should probably be checked, since git_signature_dup can have an allocation failure.

There's also one in hunk_from_entry, but I'm not sure if that call has to be checked because blame_internal doesn't check hunk_from_entry for any errors (should it?).

git_signature_dup can have an allocation failure
Copy link
Contributor

@lhchavez lhchavez left a comment

Choose a reason for hiding this comment

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

I figured these calls should probably be checked, since git_signature_dup can have an allocation failure.

yes they should!

There's also one in hunk_from_entry, but I'm not sure if that call has to be checked because blame_internal doesn't check hunk_from_entry for any errors (should it?).

yeah, anything that has an allocation failure should be checked. but this change is good as-is. thanks for making these!

@ethomson
Copy link
Member

ethomson commented Mar 4, 2021

Thanks @mamapanda!

@ethomson ethomson merged commit 80bdeca into libgit2:main Mar 4, 2021
@ethomson ethomson mentioned this pull request Jun 20, 2021
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