From 68d021b651ba37dfc4e6ce803f09876f9194aa4a Mon Sep 17 00:00:00 2001 From: Andrew Poelstra Date: Mon, 18 Dec 2023 20:37:28 +0000 Subject: [PATCH] fix incorrect FFI binding for pubkey_combine --- Cargo-minimal.lock | 2 +- Cargo-recent.lock | 2 +- secp256k1-sys/CHANGELOG.md | 4 ++++ secp256k1-sys/Cargo.toml | 2 +- secp256k1-sys/src/lib.rs | 2 +- src/key.rs | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Cargo-minimal.lock b/Cargo-minimal.lock index 8ecb0eefc..e83dee20f 100644 --- a/Cargo-minimal.lock +++ b/Cargo-minimal.lock @@ -273,7 +273,7 @@ dependencies = [ [[package]] name = "secp256k1-sys" -version = "0.9.1" +version = "0.9.2" dependencies = [ "cc", "libc", diff --git a/Cargo-recent.lock b/Cargo-recent.lock index 502204a52..21f5eba3a 100644 --- a/Cargo-recent.lock +++ b/Cargo-recent.lock @@ -194,7 +194,7 @@ dependencies = [ [[package]] name = "secp256k1-sys" -version = "0.9.1" +version = "0.9.2" dependencies = [ "cc", "libc", diff --git a/secp256k1-sys/CHANGELOG.md b/secp256k1-sys/CHANGELOG.md index 6030bb297..327792a31 100644 --- a/secp256k1-sys/CHANGELOG.md +++ b/secp256k1-sys/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.9.2 - 2023-12-18 + +* Fix incorrect FFI binding for `secp256k1_pubkey_combine` + # 0.9.1 - 2023-12-07 * Patch out any instances of printf in upstream [#663](https://github.com/rust-bitcoin/rust-secp256k1/pull/663) diff --git a/secp256k1-sys/Cargo.toml b/secp256k1-sys/Cargo.toml index 7fd3d5270..50cef78ea 100644 --- a/secp256k1-sys/Cargo.toml +++ b/secp256k1-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "secp256k1-sys" -version = "0.9.1" +version = "0.9.2" authors = [ "Dawid Ciężarkiewicz ", "Andrew Poelstra ", "Steven Roose " ] diff --git a/secp256k1-sys/src/lib.rs b/secp256k1-sys/src/lib.rs index b0e2489d5..6d58629cf 100644 --- a/secp256k1-sys/src/lib.rs +++ b/secp256k1-sys/src/lib.rs @@ -724,7 +724,7 @@ extern "C" { pub fn secp256k1_ec_pubkey_combine(cx: *const Context, out: *mut PublicKey, ins: *const *const PublicKey, - n: c_int) + n: size_t) -> c_int; #[cfg_attr(not(rust_secp_no_symbol_renaming), link_name = "rustsecp256k1_v0_9_1_ecdh")] diff --git a/src/key.rs b/src/key.rs index 3b2885230..84255cf00 100644 --- a/src/key.rs +++ b/src/key.rs @@ -676,7 +676,7 @@ impl PublicKey { ffi::secp256k1_context_no_precomp, &mut ret, ptrs.as_c_ptr(), - keys.len() as i32, + keys.len(), ) == 1 { Ok(PublicKey(ret))