[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.
This commit is contained in:
Matt Corallo 2024-01-31 19:48:44 +00:00
parent c9e4410a05
commit 7377cc99c7

View file

@ -83,7 +83,7 @@ pub fn do_test(data: &[u8]) {
Ok(len) => len,
Err(_) => return,
};
buf.copy_from_slice(&get_slice!(len as usize + 16));
buf[..len as usize + 16].copy_from_slice(&get_slice!(len as usize + 16));
match crypter.decrypt_message(&mut buf[..len as usize + 16]) {
Ok(_) => {},
Err(_) => return,