projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fd9852
)
ath6kl: fix firmware version assignment
author
Ben Greear
<greearb@candelatech.com>
Wed, 21 Oct 2015 21:53:21 +0000
(14:53 -0700)
committer
Kalle Valo
<kvalo@qca.qualcomm.com>
Thu, 29 Oct 2015 11:06:56 +0000
(13:06 +0200)
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>
drivers/net/wireless/ath/ath6kl/init.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/ath/ath6kl/init.c
b/drivers/net/wireless/ath/ath6kl/init.c
index 6e473fa4b13cae0df30a33fd9162729afaf76f6b..e3f3a6ae0c0af18399861b9ac3432e0154eb4604 100644
(file)
--- 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",