Skip to content

Commit 7377cc9

Browse files
committed
[fuzz] Fix slice copy in peer_crypt_target
This has apparently been broken for quite some time...I guess `peer_crypt_target` doesn't get much CPU anymore.
1 parent c9e4410 commit 7377cc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fuzz/src/peer_crypt.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub fn do_test(data: &[u8]) {
8383
Ok(len) => len,
8484
Err(_) => return,
8585
};
86-
buf.copy_from_slice(&get_slice!(len as usize + 16));
86+
buf[..len as usize + 16].copy_from_slice(&get_slice!(len as usize + 16));
8787
match crypter.decrypt_message(&mut buf[..len as usize + 16]) {
8888
Ok(_) => {},
8989
Err(_) => return,

0 commit comments

Comments
 (0)