diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2019-07-21 11:23:32 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2019-07-21 11:26:06 +0200 |
commit | db8e08a5a4469f98ed5d9b0ff3189e356f53d924 (patch) | |
tree | ed77c3914ebf100e23da982c7a334a695d902616 /package/kernel/mac80211/patches/brcm/102-v5.4-brcmfmac-use-strlcpy-instead-of-strcpy.patch | |
parent | 3f1e8c01316a5ea0162197cd8eb6dbbabe396176 (diff) | |
download | upstream-db8e08a5a4469f98ed5d9b0ff3189e356f53d924.tar.gz upstream-db8e08a5a4469f98ed5d9b0ff3189e356f53d924.tar.bz2 upstream-db8e08a5a4469f98ed5d9b0ff3189e356f53d924.zip |
mac80211: brcm: backport first set of 5.4 brcmfmac changes
This doesn't include 9ff8614a3dbe ("brcmfmac: use separate Kconfig file
for brcmfmac") due to a few conflicts with backports changes.
An important change is:
[PATCH 2/7] brcmfmac: change the order of things in brcmf_detach()
which fixes a rmmod crash in the brcmf_txfinalize().
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'package/kernel/mac80211/patches/brcm/102-v5.4-brcmfmac-use-strlcpy-instead-of-strcpy.patch')
-rw-r--r-- | package/kernel/mac80211/patches/brcm/102-v5.4-brcmfmac-use-strlcpy-instead-of-strcpy.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/brcm/102-v5.4-brcmfmac-use-strlcpy-instead-of-strcpy.patch b/package/kernel/mac80211/patches/brcm/102-v5.4-brcmfmac-use-strlcpy-instead-of-strcpy.patch new file mode 100644 index 0000000000..d6ddd841cc --- /dev/null +++ b/package/kernel/mac80211/patches/brcm/102-v5.4-brcmfmac-use-strlcpy-instead-of-strcpy.patch @@ -0,0 +1,26 @@ +From bbfab331e3abd9fa8767eea6bf5c4684cdd4b934 Mon Sep 17 00:00:00 2001 +From: Neo Jou <neojou@gmail.com> +Date: Tue, 21 May 2019 17:12:20 +0800 +Subject: [PATCH] brcmfmac: use strlcpy() instead of strcpy() + +The function strcpy() is inherently not safe. Though the function +works without problems here, it would be better to use other safer +function, e.g. strlcpy(), to replace strcpy() still. + +Signed-off-by: Neo Jou <neojou@gmail.com> +Signed-off-by: Kalle Valo <kvalo@codeaurora.org> +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +@@ -258,7 +258,7 @@ int brcmf_c_preinit_dcmds(struct brcmf_i + + /* query for 'ver' to get version info from firmware */ + memset(buf, 0, sizeof(buf)); +- strcpy(buf, "ver"); ++ strlcpy(buf, "ver", sizeof(buf)); + err = brcmf_fil_iovar_data_get(ifp, "ver", buf, sizeof(buf)); + if (err < 0) { + bphy_err(drvr, "Retrieving version information failed, %d\n", |