Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53cc3291 authored by Ben Greear's avatar Ben Greear Committed by Kalle Valo
Browse files

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: default avatarBen Greear <greearb@candelatech.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 7fd98524
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -994,7 +994,7 @@ static int ath6kl_fetch_fw_apin(struct ath6kl *ar, const char *name)
		switch (ie_id) {
		switch (ie_id) {
		case ATH6KL_FW_IE_FW_VERSION:
		case ATH6KL_FW_IE_FW_VERSION:
			strlcpy(ar->wiphy->fw_version, data,
			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,
			ath6kl_dbg(ATH6KL_DBG_BOOT,
				   "found fw version %s\n",
				   "found fw version %s\n",