diff options
author | Ben Greear <greearb@candelatech.com> | 2015-10-21 14:53:21 -0700 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2015-10-29 13:06:56 +0200 |
commit | 53cc3291bcfbefc0b3f1e3b7b30ed028b5f1a75d (patch) | |
tree | 467c77dfc8717a66709e5abbeb71f198c757b999 | |
parent | 7fd98524560cac3a629aa1130d45260d4469d254 (diff) | |
download | op-kernel-dev-53cc3291bcfbefc0b3f1e3b7b30ed028b5f1a75d.zip op-kernel-dev-53cc3291bcfbefc0b3f1e3b7b30ed028b5f1a75d.tar.gz |
ath6kl: fix firmware version assignment
Improper use of strlcpy caused garbage to be appended to the
firmware version string. Fix this by paying attention to the
ie_lenth.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c index 6e473fa..e3f3a6a 100644 --- a/drivers/net/wireless/ath/ath6kl/init.c +++ b/drivers/net/wireless/ath/ath6kl/init.c @@ -994,7 +994,7 @@ static int ath6kl_fetch_fw_apin(struct ath6kl *ar, const char *name) switch (ie_id) { case ATH6KL_FW_IE_FW_VERSION: strlcpy(ar->wiphy->fw_version, data, - sizeof(ar->wiphy->fw_version)); + min(sizeof(ar->wiphy->fw_version), ie_len+1)); ath6kl_dbg(ATH6KL_DBG_BOOT, "found fw version %s\n", |