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