Merge remote-tracking branch 'upstream/master' into cleanup/sendmany_txbuilder-prereq
This commit is contained in:
commit
951a44de93
|
@ -815,6 +815,7 @@ dependencies = [
|
||||||
"zcash_note_encryption",
|
"zcash_note_encryption",
|
||||||
"zcash_primitives",
|
"zcash_primitives",
|
||||||
"zcash_proofs",
|
"zcash_proofs",
|
||||||
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
@ -49,6 +49,7 @@ zcash_note_encryption = "0.1"
|
||||||
zcash_primitives = "0.5"
|
zcash_primitives = "0.5"
|
||||||
zcash_proofs = "0.5"
|
zcash_proofs = "0.5"
|
||||||
ed25519-zebra = "3"
|
ed25519-zebra = "3"
|
||||||
|
zeroize = "1.4.2"
|
||||||
|
|
||||||
# Metrics
|
# Metrics
|
||||||
hyper = { version = "=0.14.2", default-features = false, features = ["server", "tcp", "http1"] }
|
hyper = { version = "=0.14.2", default-features = false, features = ["server", "tcp", "http1"] }
|
||||||
|
|
|
@ -4,6 +4,7 @@ use std::{
|
||||||
ffi::{CStr, CString},
|
ffi::{CStr, CString},
|
||||||
ptr, slice,
|
ptr, slice,
|
||||||
};
|
};
|
||||||
|
use zeroize::Zeroize;
|
||||||
|
|
||||||
use zcash_primitives::zip339;
|
use zcash_primitives::zip339;
|
||||||
|
|
||||||
|
@ -63,7 +64,9 @@ pub extern "C" fn zip339_free_phrase(phrase: *const c_char) {
|
||||||
if !phrase.is_null() {
|
if !phrase.is_null() {
|
||||||
unsafe {
|
unsafe {
|
||||||
// It is correct to cast away const here; the memory is not actually immutable.
|
// It is correct to cast away const here; the memory is not actually immutable.
|
||||||
drop(CString::from_raw(phrase as *mut c_char));
|
CString::from_raw(phrase as *mut c_char)
|
||||||
|
.into_bytes()
|
||||||
|
.zeroize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue