]> The Tcpdump Group git mirrors - libpcap/commit
Merge pull request #414 from peugnezb/correctifs
authorGuy Harris <[email protected]>
Tue, 3 Feb 2015 20:07:13 +0000 (12:07 -0800)
committerGuy Harris <[email protected]>
Tue, 3 Feb 2015 20:07:13 +0000 (12:07 -0800)
commite598f985c470436e16f5aab748b14556ff16686c
tree0d8e1e5d1ca635f6cfd243801dbe5d0791a40792
parent4786f880bb54ea5286f8ffcfd7b92ce94293e1b6
parent23406aef603b18026532f7fa05858d8404fef92a
Merge pull request #414 from peugnezb/correctifs

Bug fixes to gencode.c/gencode.h and pcap-linux.c

If tp version is not valid, we don't do anything in the switch, and thus don't set req.tp_frame_nr, but we later use it.  (This "shouldn't happen", as we should never use a TPACKET_ version we don't handle, but this catches that case in case it can happen.)

The variable "len" needs to be initialized to the buffer size "&bpf_extensions" - it's a value-result parameter in getsockopt(), which should be set to the size of the buffer being passed.

Make the mask length parameter in some gencode.c routines unsigned.

Close a socket file descriptor in the right place.