]> The Tcpdump Group git mirrors - libpcap/commit
Check for zero-length addresses.
authorGuy Harris <[email protected]>
Sun, 12 Mar 2017 05:36:39 +0000 (21:36 -0800)
committerGuy Harris <[email protected]>
Sun, 12 Mar 2017 05:36:39 +0000 (21:36 -0800)
commit7a88c4d6f14d4a4e679ebbfe629a69783af700a1
tree3b17e6a03be6e9c333275c1bb763db416f8ac50c
parent3cec15e97f1b9162b313a7747a87896969b0cab9
Check for zero-length addresses.

At least on my macOS Sierra machine, the utun0 device has a destination
address with an sa_len of 0 (and an sa_family of AF_UNSPEC).  That's not
valid - sa_len is *supposed* to be the total length of the structure,
but a total length of 0 doesn't even leave room for the sa_len and
sa_family fields, which are present in *all* sockaddr structures.
pcap.c