]> The Tcpdump Group git mirrors - libpcap/blobdiff - pcap-airpcap.c
Make sure no read routine process more than INT_MAX packets.
[libpcap] / pcap-airpcap.c
index d986ad9c39bcb37d273871c17b2527dfa34519a2..510e4c4e6a27c8be6e37cabd3b24e0c1e5355575 100644 (file)
@@ -627,6 +627,9 @@ airpcap_read(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.
         */
 #define bhp ((AirpcapBpfHeader *)bp)
        n = 0;