Skip to content

Commit

Permalink
wifi: ath6kl: minor fix for allocation size
Browse files Browse the repository at this point in the history
[ Upstream commit 778f83f ]

Although the "param" pointer occupies more or equal space compared
to "*param", the allocation size should use the size of variable
itself.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: bdcd817 ("Add ath6kl cleaned up driver")
Signed-off-by: Alexey V. Vissarionov <gremlin@altlinux.org>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230117110414.GC12547@altlinux.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Alexey V. Vissarionov authored and gregkh committed May 11, 2023
1 parent 830d79a commit 1a59067
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath6kl/bmi.c
Expand Up @@ -246,7 +246,7 @@ int ath6kl_bmi_execute(struct ath6kl *ar, u32 addr, u32 *param)
return -EACCES;
}

size = sizeof(cid) + sizeof(addr) + sizeof(param);
size = sizeof(cid) + sizeof(addr) + sizeof(*param);
if (size > ar->bmi.max_cmd_size) {
WARN_ON(1);
return -EINVAL;
Expand Down

0 comments on commit 1a59067

Please sign in to comment.