diff options
Diffstat (limited to 'net/core/dev_ioctl.c')
-rw-r--r-- | net/core/dev_ioctl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c index 183ef95db502..2bded3ecf03d 100644 --- a/net/core/dev_ioctl.c +++ b/net/core/dev_ioctl.c | |||
@@ -28,6 +28,7 @@ static int dev_ifname(struct net *net, struct ifreq __user *arg) | |||
28 | 28 | ||
29 | if (copy_from_user(&ifr, arg, sizeof(struct ifreq))) | 29 | if (copy_from_user(&ifr, arg, sizeof(struct ifreq))) |
30 | return -EFAULT; | 30 | return -EFAULT; |
31 | ifr.ifr_name[IFNAMSIZ-1] = 0; | ||
31 | 32 | ||
32 | error = netdev_get_name(net, ifr.ifr_name, ifr.ifr_ifindex); | 33 | error = netdev_get_name(net, ifr.ifr_name, ifr.ifr_ifindex); |
33 | if (error) | 34 | if (error) |