We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d7c1173 commit 174e905Copy full SHA for 174e905
1 file changed
crypto/src/mnemonic.rs
@@ -174,7 +174,7 @@ impl MnemonicGenerator {
174
};
175
176
// We handle the entropy directly here to avoid tiny-bip39's reliance on outdated rand lib
177
- let entropy = &mut Vec::with_capacity(mnemonic_type.entropy_bits() / 8);
+ let entropy = &mut vec![0u8; mnemonic_type.entropy_bits() / 8];
178
rand::thread_rng().fill_bytes(entropy);
179
let mnemonic = bip39::Mnemonic::from_entropy(entropy, lang).unwrap();
180
0 commit comments