Skip to content

Commit

Permalink
Fix broken copy_from_slice (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-hiner authored Jul 14, 2022
1 parent 05ba8df commit 2a42e9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion boringtun/src/noise/rate_limiter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl RateLimiter {

let iv = GenericArray::from_slice(nonce);

encrypted_cookie.copy_from_slice(&cookie);
encrypted_cookie[..16].copy_from_slice(&cookie);
let tag = cipher
.encrypt_in_place_detached(iv, mac1, &mut encrypted_cookie[..16])
.map_err(|_| WireGuardError::DestinationBufferTooSmall)?;
Expand Down

0 comments on commit 2a42e9b

Please sign in to comment.