]> The Tcpdump Group git mirrors - libpcap/commitdiff
tp_mac and tp_snaplen are unsigned; print them with %u, not %d.
authorGuy Harris <[email protected]>
Fri, 9 Jan 2015 00:28:05 +0000 (16:28 -0800)
committerGuy Harris <[email protected]>
Fri, 9 Jan 2015 00:32:34 +0000 (16:32 -0800)
See, for example, GitHub libpcap issue #404.

pcap-linux.c

index 9fddadb6cf567ee9fa943ee605be465c9144d63d..6fb2be1cd8b8d6d3d22bcb279a384a55dbe9e909 100644 (file)
@@ -3980,7 +3980,7 @@ pcap_read_linux_mmap(pcap_t *handle, int max_packets, pcap_handler callback,
                if (tp_mac + tp_snaplen > handle->bufsize) {
                        snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, 
                                "corrupted frame on kernel ring mac "
-                               "offset %d + caplen %d > frame len %d", 
+                               "offset %u + caplen %u > frame len %d", 
                                tp_mac, tp_snaplen, handle->bufsize);
                        return -1;
                }