crypto: allow NULL 'ad' to aes_siv_decrypt
This commit is contained in:
parent
53e68b64b2
commit
1a27cd1548
|
@ -389,7 +389,9 @@ bool aes_siv_decrypt(const void *key, size_t key_len, const void *in,
|
||||||
if (in_len < 16)
|
if (in_len < 16)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (ad)
|
||||||
memcpy(iov, ad, sizeof(struct iovec) * num_ad);
|
memcpy(iov, ad, sizeof(struct iovec) * num_ad);
|
||||||
|
|
||||||
iov[num_ad].iov_base = (void *)out;
|
iov[num_ad].iov_base = (void *)out;
|
||||||
iov[num_ad].iov_len = in_len - 16;
|
iov[num_ad].iov_len = in_len - 16;
|
||||||
num_ad++;
|
num_ad++;
|
||||||
|
|
Loading…
Reference in New Issue