aboutsummaryrefslogtreecommitdiff
path: root/pcap-bpf.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2022-03-08 15:18:24 -0800
committerGuy Harris <gharris@sonic.net>2022-03-08 15:18:24 -0800
commitf6fb59b11d20222d4648cdceeaadf6ce971a7a9a (patch)
tree82d4be40231a93047587a9cd52777b77528e188d /pcap-bpf.c
parentcc9e70b80e0a33130fcb24fbab13a40666976d7f (diff)
parente75cc82c46e0f1208fbac03530da6a30976c7fd6 (diff)
Merge branch 'master' into pcap-options
Diffstat (limited to 'pcap-bpf.c')
-rw-r--r--pcap-bpf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pcap-bpf.c b/pcap-bpf.c
index f0ccb965..c9967ee0 100644
--- a/pcap-bpf.c
+++ b/pcap-bpf.c
@@ -1177,6 +1177,9 @@ pcap_read_bpf(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
/*
* Loop through each packet.
+ *
+ * This assumes that a single buffer of packets will have
+ * <= INT_MAX packets, so the packet count doesn't overflow.
*/
#ifdef BIOCSTSTAMP
#define bhp ((struct bpf_xhdr *)bp)
@@ -2968,7 +2971,7 @@ get_if_flags(const char *name, bpf_u_int32 *flags, char *errbuf)
}
#else
static int
-get_if_flags(const char *name _U_, bpf_u_int32 *flags _U_, char *errbuf _U_)
+get_if_flags(const char *name _U_, bpf_u_int32 *flags, char *errbuf _U_)
{
/*
* Nothing we can do other than mark loopback devices as "the