aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-04-18 16:39:38 -0400
committerJesse Luehrs <doy@tozt.net>2020-04-18 16:39:38 -0400
commita826ed12b8dee612f12103a4efe89be0fbd27943 (patch)
tree0d0d8fc0e2bf90162aa876a5607a4bd465e8c65a
parentbe6da4a9d82467690e7388bc69db4d9facf7a6b8 (diff)
downloadrbw-a826ed12b8dee612f12103a4efe89be0fbd27943.tar.gz
rbw-a826ed12b8dee612f12103a4efe89be0fbd27943.zip
ensure we clear the entire memory for the locked vec
-rw-r--r--src/locked.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/locked.rs b/src/locked.rs
index 4f55f20..4db0423 100644
--- a/src/locked.rs
+++ b/src/locked.rs
@@ -39,6 +39,7 @@ impl Vec {
impl Drop for Vec {
fn drop(&mut self) {
+ self.extend(std::iter::repeat(0));
self.data.as_mut().zeroize();
}
}