diff options
author | Neo Jou <neojou@gmail.com> | 2019-05-21 17:12:20 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-05-28 15:25:33 +0300 |
commit | bbfab331e3abd9fa8767eea6bf5c4684cdd4b934 (patch) | |
tree | 47e0ea599b79256bb1e4d88c272bfbaef5eee380 /drivers/net/wireless | |
parent | b07e1ae2ce53a60af67009ef199603a588003e07 (diff) |
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>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c index 7c9d06d525b1..aa89d620ee5d 100644 --- 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_if *ifp) /* 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", |