segfault when trying to get signature from BlameHunk where commit author email is empty
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 450
- Avg merge
- 11m
- Merged PRs (30d)
- 1
Description
- configure git user.email to ""
- commit a change
- blame the file
- get the hunk that contains that change
- get final_signature from the hunk
- do something with the signature
- segfault
it seems like the raw member in the Signature struct is null if it corresponds to a commit where the author has an empty email.
repository that reproduces the crash: https://github.com/jnises/git2-bug
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the crash using the steps in the issue or the linked jnises/git2-bug repository, then inspect BlameHunk::final_signature and the Signature raw member when the commit author email is empty. Done means handling that empty-email case without a segfault when the returned signature is used.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100