Skip to content

Commit 06f16dd

Browse files
authored
Merge pull request #82 from iron-fish/fix/hughy/decrypt-legacy-allocation
do not pre-allocate vector capacity in MultiRecipientBlob
2 parents d0712d8 + 6630389 commit 06f16dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/multienc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ impl MultiRecipientBlob<Vec<EncryptedKey>, Vec<u8>> {
305305
reader.read_exact(&mut encrypted_keys_len)?;
306306
let encrypted_keys_len = u32::from_le_bytes(encrypted_keys_len) as usize;
307307

308-
let mut encrypted_keys = Vec::with_capacity(encrypted_keys_len);
308+
let mut encrypted_keys = Vec::new();
309309
for _ in 0..encrypted_keys_len {
310310
let mut key = EncryptedKey::default();
311311
reader.read_exact(&mut key)?;

0 commit comments

Comments
 (0)