From dbd0a7035c9a7a59f17d1312063ffa7fc3cd6860 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Mon, 4 Apr 2022 23:35:32 +0200 Subject: treewide: Invalid type in argument to printf format specifier, CWE-686 Harmless except for two bad debugging prints. Signed-off-by: Stefano Brivio --- pcap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pcap.c') diff --git a/pcap.c b/pcap.c index 296bbb5..64beb34 100644 --- a/pcap.c +++ b/pcap.c @@ -88,7 +88,7 @@ void pcap(const char *pkt, size_t len) h.caplen = h.len = len; if (write(pcap_fd, &h, sizeof(h)) < 0 || write(pcap_fd, pkt, len) < 0) - debug("Cannot log packet, length %u", len); + debug("Cannot log packet, length %lu", len); } /** @@ -123,7 +123,7 @@ void pcapm(const struct msghdr *mh) return; fail: - debug("Cannot log packet, length %u", iov->iov_len - 4); + debug("Cannot log packet, length %lu", iov->iov_len - 4); } /** @@ -161,7 +161,7 @@ void pcapmm(const struct mmsghdr *mmh, unsigned int vlen) } return; fail: - debug("Cannot log packet, length %u", iov->iov_len - 4); + debug("Cannot log packet, length %lu", iov->iov_len - 4); } /** -- cgit v1.2.3