Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ffi): fix bad access #3772

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions base_layer/wallet_ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ pub unsafe extern "C" fn commitment_signature_create_from_bytes(
return ptr::null_mut();
}

let nonce = match Commitment::from_bytes(&(*public_nonce_bytes).0) {
let nonce = match Commitment::from_bytes(&(*public_nonce_bytes).0.clone()) {
Ok(nonce) => nonce,
Err(e) => {
error!(
Expand All @@ -931,7 +931,7 @@ pub unsafe extern "C" fn commitment_signature_create_from_bytes(
return ptr::null_mut();
},
};
let u = match TariPrivateKey::from_bytes(&(*u_bytes).0) {
let u = match TariPrivateKey::from_bytes(&(*u_bytes).0.clone()) {
Ok(u) => u,
Err(e) => {
error!(
Expand All @@ -943,7 +943,7 @@ pub unsafe extern "C" fn commitment_signature_create_from_bytes(
return ptr::null_mut();
},
};
let v = match TariPrivateKey::from_bytes(&(*v_bytes).0) {
let v = match TariPrivateKey::from_bytes(&(*v_bytes).0.clone()) {
Ok(u) => u,
Err(e) => {
error!(
Expand Down