Thread (3 messages) 3 messages, 2 authors, 2021-07-23

Re: [PATCH] staging/ks7010: Remove all strcpy() uses in favor of strscpy()

From: Dan Carpenter <hidden>
Date: 2021-07-19 05:27:05
Also in: lkml

On Sat, Jul 17, 2021 at 05:37:59PM +0200, Len Baker wrote:
quoted hunk ↗ jump to hunk
@@ -1808,7 +1808,7 @@ static int ks_wlan_get_firmware_version(struct net_device *dev,
 {
 	struct ks_wlan_private *priv = netdev_priv(dev);

-	strcpy(extra, priv->firmware_version);
+	strscpy(extra, priv->firmware_version, sizeof(extra));
Extra is a pointer and not an array so this doesn't work.

regards,
dan carpenter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help