diff options
author | Johannes Berg <johannes.berg@intel.com> | 2022-08-29 11:46:38 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2022-09-03 16:40:06 +0200 |
commit | 2aec909912da55a6e469fd6ee8412080a5433ed2 (patch) | |
tree | 20833c2bb291f9019c954434c00b093d6d45a935 /net/wireless/lib80211_crypt_ccmp.c | |
parent | 8c0427842aaef161a38ac83b7e8d8fe050b4be04 (diff) | |
download | linux-stable-2aec909912da55a6e469fd6ee8412080a5433ed2.tar.gz linux-stable-2aec909912da55a6e469fd6ee8412080a5433ed2.tar.bz2 linux-stable-2aec909912da55a6e469fd6ee8412080a5433ed2.zip |
wifi: use struct_group to copy addresses
We sometimes copy all the addresses from the 802.11 header
for the AAD, which may cause complaints from fortify checks.
Use struct_group() to avoid the compiler warnings/errors.
Change-Id: Ic3ea389105e7813b22095b295079eecdabde5045
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/lib80211_crypt_ccmp.c')
-rw-r--r-- | net/wireless/lib80211_crypt_ccmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/lib80211_crypt_ccmp.c b/net/wireless/lib80211_crypt_ccmp.c index 6a5f08f7491e..cca5e1cf089e 100644 --- a/net/wireless/lib80211_crypt_ccmp.c +++ b/net/wireless/lib80211_crypt_ccmp.c @@ -136,7 +136,7 @@ static int ccmp_init_iv_and_aad(const struct ieee80211_hdr *hdr, pos = (u8 *) hdr; aad[0] = pos[0] & 0x8f; aad[1] = pos[1] & 0xc7; - memcpy(aad + 2, hdr->addr1, 3 * ETH_ALEN); + memcpy(aad + 2, &hdr->addrs, 3 * ETH_ALEN); pos = (u8 *) & hdr->seq_ctrl; aad[20] = pos[0] & 0x0f; aad[21] = 0; /* all bits masked */ |