Highlights
Memory Corruption: 3 prior fixes. Scrutinize any change in this area.
libgit2-sys/libgit2: most-fixed (1 issue). Treat as high-risk during review.
4 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns
The bug types that recur here, drawn from past fixes, not open vulnerabilities.
Memory Corruption: Temporary allocations (such as CStrings) passed to native libgit2 functions like git_merge_file_from_index can lead to use-after-free vulnerabilities if the lifetimes of those temporaries are not strictly bound to the duration of the FFI call. Developers must ensure FFI inputs do not drop prematurely.
Memory Safety: Failure to propagate errors or return early when native constructors (such as git_odb_open_rstream) fail allows uninitialized pointers to be wrapped in safe Rust objects. This violates Rust's safety guarantees and leads to unpredictable behavior during object destruction or access.
Memory Corruption: Assuming that fields on raw C structs (like final_signature in raw blame hunks) are always valid and non-null leads to direct null-pointer dereferences when exposed to safe Rust APIs. Checked conversions returning Options are necessary.