Security: update git2 to fix undefined behavior#114
Merged
Conversation
This updates [git2] to fix two security advisories that do not seem to affect git-status-vars. ### [RUSTSEC-2026-0183] > When calling `Remote::list()` for a remote of a git repository, when > that remote does not advertise any references, git2 passes a null > pointer to the unsafe function `slice::from_raw_parts()`. Based on the > safety section documentation of function, data must be non-null even > for slices of length zero. Thus, the use of a null pointer leads to > undefined behavior. ### [RUSTSEC-2026-0184] > When a `Blame` is created via `Blame::blame_buffer()`, and a > `BlameHunk` is retrieved, the pointers to the original author, > original committer, final author, and final committer may be null if > unavailable. The corresponding `BlameHunk` methods then create > `Signature`s based on null pointers; attempting to access the data of > the `Signature`s leads to dereferencing null pointers. [git2]: https://crates.io/crates/git2 [RUSTSEC-2026-0183]: https://rustsec.org/advisories/RUSTSEC-2026-0183 [RUSTSEC-2026-0184]: https://rustsec.org/advisories/RUSTSEC-2026-0184
Bump edition to 2024 at the same time, and fix a bunch of lints.
This file contains hidden or 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
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.
This updates git2 to fix two security advisories that do not seem to
affect git-status-vars.
RUSTSEC-2026-0183
RUSTSEC-2026-0184