Skip to content

Commit

Permalink
ath6kl: fix firmware version assignment
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Greear authored and Kalle Valo committed Oct 29, 2015
1 parent 7fd9852 commit 53cc329
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath6kl/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 53cc329

Please sign in to comment.