diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-01-08 16:28:05 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-01-08 16:33:20 -0800 |
commit | 15b3ddc717fc031a6173cff061ed51c16e45560a (patch) | |
tree | 75bd071a616a399263e97641dca36d5a79332eb6 | |
parent | ac88ae4af1f72a8e8e18e7dcf4d428f7f19dd1bd (diff) | |
download | libpcap-15b3ddc717fc031a6173cff061ed51c16e45560a.tar.gz |
tp_mac and tp_snaplen are unsigned; print them with %u, not %d.
See, for example, GitHub libpcap issue #404.
-rw-r--r-- | pcap-linux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pcap-linux.c b/pcap-linux.c index 638b1c00..f8836aff 100644 --- a/pcap-linux.c +++ b/pcap-linux.c @@ -3682,7 +3682,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; } |