We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8fc1f1 commit f119f23Copy full SHA for f119f23
net/ipv4/arp.c
@@ -1125,7 +1125,8 @@ static int arp_req_get(struct arpreq *r, struct net_device *dev)
1125
if (neigh) {
1126
if (!(READ_ONCE(neigh->nud_state) & NUD_NOARP)) {
1127
read_lock_bh(&neigh->lock);
1128
- memcpy(r->arp_ha.sa_data, neigh->ha, dev->addr_len);
+ memcpy(r->arp_ha.sa_data, neigh->ha,
1129
+ min(dev->addr_len, (unsigned char)sizeof(r->arp_ha.sa_data_min)));
1130
r->arp_flags = arp_state_to_flags(neigh);
1131
read_unlock_bh(&neigh->lock);
1132
r->arp_ha.sa_family = dev->type;
0 commit comments