mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-21 22:09:23 +01:00
crypto: fix uninitialized variable coverity warning
Same as for aes_siv_decrypt, check num_ads before calling memcpy.
This commit is contained in:
parent
ee52968043
commit
14aa333a39
@ -390,7 +390,7 @@ bool aes_siv_decrypt(const void *key, size_t key_len, const void *in,
|
||||
if (in_len < 16)
|
||||
return false;
|
||||
|
||||
if (ad)
|
||||
if (ad && num_ad)
|
||||
memcpy(iov, ad, sizeof(struct iovec) * num_ad);
|
||||
|
||||
iov[num_ad].iov_base = (void *)out;
|
||||
|
Loading…
Reference in New Issue
Block a user