aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/ipheth.c
diff options
context:
space:
mode:
authorLen Baker <len.baker@gmx.com>2021-08-01 19:12:26 +0200
committerDavid S. Miller <davem@davemloft.net>2021-08-03 11:48:28 +0100
commit493c3ca6bd754d8587604496eb814f72e933075d (patch)
tree370ce9459825c597ebb1b30b6ef0c2864c1e784d /drivers/net/usb/ipheth.c
parentqed: Remove redundant prints from the iWARP SYN handling (diff)
downloadlinux-dev-493c3ca6bd754d8587604496eb814f72e933075d.tar.xz
linux-dev-493c3ca6bd754d8587604496eb814f72e933075d.zip
drivers/net/usb: Remove all strcpy() uses
strcpy() performs no bounds checking on the destination buffer. This could result in linear overflows beyond the end of the buffer, leading to all kinds of misbehaviors. The safe replacement is strscpy(). Signed-off-by: Len Baker <len.baker@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/ipheth.c')
-rw-r--r--drivers/net/usb/ipheth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c
index 207e59e74935..06e2181e5810 100644
--- a/drivers/net/usb/ipheth.c
+++ b/drivers/net/usb/ipheth.c
@@ -443,7 +443,7 @@ static int ipheth_probe(struct usb_interface *intf,
netdev->netdev_ops = &ipheth_netdev_ops;
netdev->watchdog_timeo = IPHETH_TX_TIMEOUT;
- strcpy(netdev->name, "eth%d");
+ strscpy(netdev->name, "eth%d", sizeof(netdev->name));
dev = netdev_priv(netdev);
dev->udev = udev;