diff options
-rw-r--r-- | net/packet/af_packet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 71ac6559e0c6..8a10d5b3c832 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
@@ -1475,7 +1475,7 @@ static int packet_sendmsg_spkt(struct kiocb *iocb, struct socket *sock, | |||
1475 | * Find the device first to size check it | 1475 | * Find the device first to size check it |
1476 | */ | 1476 | */ |
1477 | 1477 | ||
1478 | saddr->spkt_device[13] = 0; | 1478 | saddr->spkt_device[sizeof(saddr->spkt_device) - 1] = 0; |
1479 | retry: | 1479 | retry: |
1480 | rcu_read_lock(); | 1480 | rcu_read_lock(); |
1481 | dev = dev_get_by_name_rcu(sock_net(sk), saddr->spkt_device); | 1481 | dev = dev_get_by_name_rcu(sock_net(sk), saddr->spkt_device); |