libstand: NULL pointer dereference in rarp

readether argument is missing & operator.

CID:		1374944
Reported by:	Coverity, cem
Reviewed by:	cem
Differential Revision:	https://reviews.freebsd.org/D10663
This commit is contained in:
tsoome 2017-05-10 15:35:41 +00:00
parent b2359e58e4
commit 1b6e9c0c9d

View File

@ -155,7 +155,7 @@ rarprecv(struct iodesc *d, void **pkt, void **payload, time_t tleft)
printf("rarprecv: ");
#endif
n = readether(d, ptr, (void **)&ap, tleft, &etype);
n = readether(d, &ptr, (void **)&ap, tleft, &etype);
errno = 0; /* XXX */
if (n == -1 || n < sizeof(struct ether_arp)) {
#ifdef RARP_DEBUG