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

Commit bbfab331 authored by Neo Jou's avatar Neo Jou Committed by Kalle Valo
Browse files

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: default avatarNeo Jou <neojou@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent b07e1ae2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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",