projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c21403
)
r8152: replace strncpy with strlcpy
author
hayeswang
<
[email protected]
>
Tue, 26 Aug 2014 02:08:23 +0000
(10:08 +0800)
committer
David S. Miller
<
[email protected]
>
Wed, 27 Aug 2014 23:18:06 +0000
(16:18 -0700)
Replace the strncpy with strlcpy, and use sizeof to determine the
length.
Signed-off-by: Hayes Wang <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/usb/r8152.c
patch
|
blob
|
history
diff --git
a/drivers/net/usb/r8152.c
b/drivers/net/usb/r8152.c
index 2470d9c2e4f4d1a357f96b13d8fb00237d24f771..33dcc975c62db827cc95805e52ad1654dce76ede 100644
(file)
--- a/
drivers/net/usb/r8152.c
+++ b/
drivers/net/usb/r8152.c
@@
-3151,8
+3151,8
@@
static void rtl8152_get_drvinfo(struct net_device *netdev,
{
struct r8152 *tp = netdev_priv(netdev);
- str
ncpy(info->driver, MODULENAME, ETHTOOL_BUSINFO_LEN
);
- str
ncpy(info->version, DRIVER_VERSION, ETHTOOL_BUSINFO_LEN
);
+ str
lcpy(info->driver, MODULENAME, sizeof(info->driver)
);
+ str
lcpy(info->version, DRIVER_VERSION, sizeof(info->version)
);
usb_make_path(tp->udev, info->bus_info, sizeof(info->bus_info));
}