Skip to content

Commit a233483

Browse files
committed
Update to libgit2 1.5.1
1 parent bce1555 commit a233483

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "git2"
3-
version = "0.16.0"
3+
version = "0.16.1"
44
authors = ["Josh Triplett <josh@joshtriplett.org>", "Alex Crichton <alex@alexcrichton.com>"]
55
license = "MIT OR Apache-2.0"
66
readme = "README.md"
@@ -20,7 +20,7 @@ url = "2.0"
2020
bitflags = "1.1.0"
2121
libc = "0.2"
2222
log = "0.4.8"
23-
libgit2-sys = { path = "libgit2-sys", version = "0.14.1" }
23+
libgit2-sys = { path = "libgit2-sys", version = "0.14.2" }
2424

2525
[target."cfg(all(unix, not(target_os = \"macos\")))".dependencies]
2626
openssl-sys = { version = "0.9.0", optional = true }

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ libgit2 bindings for Rust.
66

77
```toml
88
[dependencies]
9-
git2 = "0.16"
9+
git2 = "0.16.1"
1010
```
1111

1212
## Rust version requirements

libgit2-sys/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "libgit2-sys"
3-
version = "0.14.1+1.5.0"
3+
version = "0.14.2+1.5.1"
44
authors = ["Josh Triplett <josh@joshtriplett.org>", "Alex Crichton <alex@alexcrichton.com>"]
55
links = "git2"
66
build = "build.rs"

libgit2-sys/build.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ fn main() {
1414
let try_to_use_system_libgit2 = !vendored && !zlib_ng_compat;
1515
if try_to_use_system_libgit2 {
1616
let mut cfg = pkg_config::Config::new();
17-
if let Ok(lib) = cfg.range_version("1.4.4".."1.6.0").probe("libgit2") {
17+
// These version ranges specifically request a version that includes
18+
// the SSH fixes for CVE-2023-22742 (1.5.1+ or 1.4.5+).
19+
if let Ok(lib) = cfg
20+
.range_version("1.5.1".."1.6.0")
21+
.probe("libgit2")
22+
.or_else(|_| cfg.range_version("1.4.5".."1.5.0").probe("libgit2"))
23+
{
1824
for include in &lib.include_paths {
1925
println!("cargo:root={}", include.display());
2026
}

0 commit comments

Comments
 (0)