diff options
author | dillon <dillon@FreeBSD.org> | 2000-03-23 18:58:59 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 2000-03-23 18:58:59 +0000 |
commit | 0c55db51dfb4751d1a89fc637d5dd46fc36b7129 (patch) | |
tree | e6a3588b20c5eebb2690ec55486c67ac629baa31 /sys | |
parent | 47452562a1f7696145d899723b8263013744c921 (diff) | |
download | FreeBSD-src-0c55db51dfb4751d1a89fc637d5dd46fc36b7129.zip FreeBSD-src-0c55db51dfb4751d1a89fc637d5dd46fc36b7129.tar.gz |
Fix parens in m_pullup() line in arp handling code. The code was
improperly doing the equivalent of (m = (function() == NULL)) instead
of ((m = function()) == NULL).
This fixes a NULL pointer dereference panic with runt arp packets.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/if_ether.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 495a554..7fbcd90 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -444,7 +444,7 @@ arpintr() panic("arpintr"); if (m->m_len < sizeof(struct arphdr) && - (m = m_pullup(m, sizeof(struct arphdr)) == NULL)) { + ((m = m_pullup(m, sizeof(struct arphdr))) == NULL)) { log(LOG_ERR, "arp: runt packet -- m_pullup failed."); continue; } |