X-Git-Url: https://git.tcpdump.org/libpcap/blobdiff_plain/7b039dff3fd06d534a2ed91270d6165e381ac1fd..09b51d326c38ea8e10ce4da09c09d50e08c5aeb8:/pcap-pf.c diff --git a/pcap-pf.c b/pcap-pf.c index f483a0e6..bd27933e 100644 --- a/pcap-pf.c +++ b/pcap-pf.c @@ -133,6 +133,9 @@ pcap_read_pf(pcap_t *pc, int cnt, pcap_handler callback, u_char *user) bp = pc->bp; /* * Loop through each packet. + * + * This assumes that a single buffer of packets will have + * <= INT_MAX packets, so the packet count doesn't overflow. */ n = 0; pad = pc->fddipad; @@ -256,7 +259,7 @@ pcap_stats_pf(pcap_t *p, struct pcap_stat *ps) * full. * * "ps_ifdrop" counts packets dropped by the network - * inteface (regardless of whether they would have passed + * interface (regardless of whether they would have passed * the input filter, of course). * * If packet filtering is not being done in the kernel: @@ -268,7 +271,7 @@ pcap_stats_pf(pcap_t *p, struct pcap_stat *ps) * the userland filter. * * "ps_ifdrop" counts packets dropped by the network - * inteface (regardless of whether they would have passed + * interface (regardless of whether they would have passed * the input filter, of course). * * These statistics don't include packets not yet read from