summaryrefslogtreecommitdiff
path: root/sys/src/9
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2022-09-27 21:40:38 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2022-09-27 21:40:38 +0000
commitb959ca328d306fb9af676b64720fea8a847da570 (patch)
tree4b95d6e575dc080c553bdd5c10db64ac5a255a51 /sys/src/9
parent7b186b0779561d1d63d291d10143e8cdfc6e3064 (diff)
arp: don't leak data in the padding of arp replies
Diffstat (limited to 'sys/src/9')
-rw-r--r--sys/src/9/ip/ethermedium.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/9/ip/ethermedium.c b/sys/src/9/ip/ethermedium.c
index 8a2a50899..19cc65eb7 100644
--- a/sys/src/9/ip/ethermedium.c
+++ b/sys/src/9/ip/ethermedium.c
@@ -586,7 +586,7 @@ recvarp(Ipifc *ifc)
n = ifc->mintu;
rbp = allocb(n);
r = (Etherarp*)rbp->rp;
- memset(r, 0, sizeof(Etherarp));
+ memset(r, 0, n);
hnputs(r->type, ETARP);
hnputs(r->hrd, 1);
hnputs(r->pro, ETIP4);