mirror of
https://github.com/neocturne/fastd.git
synced 2025-05-14 04:15:08 +02:00
cipher-test: remove unneeded tailroom in encrypt buffer
This commit is contained in:
parent
ee3babd60d
commit
81c6ffdcf6
1 changed files with 1 additions and 1 deletions
|
@ -117,7 +117,7 @@ static void method_session_free(fastd_method_session_state_t *session) {
|
|||
static bool method_encrypt(
|
||||
UNUSED fastd_peer_t *peer, fastd_method_session_state_t *session, fastd_buffer_t *out, fastd_buffer_t in) {
|
||||
size_t tail_len = alignto(in.len, sizeof(fastd_block128_t)) - in.len;
|
||||
*out = fastd_buffer_alloc(in.len, alignto(COMMON_HEADBYTES, 16), sizeof(fastd_block128_t) + tail_len);
|
||||
*out = fastd_buffer_alloc(in.len, alignto(COMMON_HEADBYTES, 16), tail_len);
|
||||
|
||||
if (tail_len)
|
||||
memset(in.data + in.len, 0, tail_len);
|
||||
|
|
Loading…
Add table
Reference in a new issue