tcpdump mailing list archives
patch for get_sa_len in libpcap-2003.09.10
From: "Mike Wiacek" <mike () iroot net>
Date: Wed, 10 Sep 2003 16:26:27 -0400
get_sa_len was getting called with a null pointer from here (in
pcap_findalldevs):
if (add_addr_to_iflist(&devlist, ifa->ifa_name,
ifa->ifa_flags, ifa->ifa_addr,
SA_LEN(ifa->ifa_addr),
ifa->ifa_netmask, SA_LEN(ifa->ifa_netmask),
broadaddr, broadaddr_size, dstaddr, dstaddr_size,
errbuf) < 0) {
ifa->ifa_netmask was null, and get_sa_len was segfaulting when it
tried to
switch on it.
attached is a very brief patch that check if addr is a null pointer
before
attempting to swtich on it. It seems to work fine for me.
mike wiacek
Attachment:
get_sa_len.patch
Description:
Current thread:
- patch for get_sa_len in libpcap-2003.09.10 Mike Wiacek (Sep 10)
- Re: patch for get_sa_len in libpcap-2003.09.10 Jun-ichiro itojun Hagino (Sep 10)
- Re: patch for get_sa_len in libpcap-2003.09.10 Guy Harris (Sep 11)
- Re: patch for get_sa_len in libpcap-2003.09.10 Guy Harris (Sep 10)
- Re: patch for get_sa_len in libpcap-2003.09.10 Jun-ichiro itojun Hagino (Sep 10)
