Skip to content

Commit

Permalink
[fuzz] Fix slice copy in peer_crypt_target
Browse files Browse the repository at this point in the history
This has apparently been broken for quite some time...I guess
`peer_crypt_target` doesn't get much CPU anymore.
  • Loading branch information
TheBlueMatt committed Feb 2, 2024
1 parent c9e4410 commit 7377cc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fuzz/src/peer_crypt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7377cc9

Please sign in to comment.