mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
crypto: allow NULL 'ad' to aes_siv_encrypt
This commit is contained in:
parent
124b04fff6
commit
53e68b64b2
@ -330,7 +330,9 @@ bool aes_siv_encrypt(const void *key, size_t key_len, const void *in,
|
||||
struct iovec iov[num_ad + 1];
|
||||
uint8_t v[16];
|
||||
|
||||
memcpy(iov, ad, sizeof(struct iovec) * num_ad);
|
||||
if (ad)
|
||||
memcpy(iov, ad, sizeof(struct iovec) * num_ad);
|
||||
|
||||
iov[num_ad].iov_base = (void *)in;
|
||||
iov[num_ad].iov_len = in_len;
|
||||
num_ad++;
|
||||
|
Loading…
Reference in New Issue
Block a user