]> The Tcpdump Group git mirrors - libpcap/blobdiff - pcap-pf.c
Update config.{guess,sub}, timestamps 2023-01-01,2023-01-21
[libpcap] / pcap-pf.c
index f483a0e66bc905c29626bf270f06d8a9f0535211..bd27933eff69e312717d908b9202e1ed7fdb2c20 100644 (file)
--- 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