aboutgitcodebugslistschat
path: root/packet.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-04-04 23:35:32 +0200
committerStefano Brivio <sbrivio@redhat.com>2022-04-05 18:47:04 +0200
commitdbd0a7035c9a7a59f17d1312063ffa7fc3cd6860 (patch)
tree41be6a60791a2f9f9b9fce73a9d7e81841765861 /packet.c
parent54f8bf82460c70e6159cebcecd200fcb450d3674 (diff)
downloadpasst-dbd0a7035c9a7a59f17d1312063ffa7fc3cd6860.tar
passt-dbd0a7035c9a7a59f17d1312063ffa7fc3cd6860.tar.gz
passt-dbd0a7035c9a7a59f17d1312063ffa7fc3cd6860.tar.bz2
passt-dbd0a7035c9a7a59f17d1312063ffa7fc3cd6860.tar.lz
passt-dbd0a7035c9a7a59f17d1312063ffa7fc3cd6860.tar.xz
passt-dbd0a7035c9a7a59f17d1312063ffa7fc3cd6860.tar.zst
passt-dbd0a7035c9a7a59f17d1312063ffa7fc3cd6860.zip
treewide: Invalid type in argument to printf format specifier, CWE-686
Harmless except for two bad debugging prints. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/packet.c b/packet.c
index d003640..fa9e9b4 100644
--- a/packet.c
+++ b/packet.c
@@ -53,12 +53,12 @@ void packet_add_do(struct pool *p, size_t len, const char *start,
}
if (len > UINT16_MAX) {
- trace("add packet length %lu, %s:%i", func, line);
+ trace("add packet length %lu, %s:%i", len, func, line);
return;
}
if ((unsigned int)((intptr_t)start - (intptr_t)p->buf) > UINT32_MAX) {
- trace("add packet start %p, buffer start %lu, %s:%i",
+ trace("add packet start %p, buffer start %p, %s:%i",
start, p->buf, func, line);
return;
}
@@ -111,7 +111,7 @@ void *packet_get_do(const struct pool *p, size_t index, size_t offset,
if (len + offset > p->pkt[index].len) {
if (func) {
- trace("data length %lu, offset %lu from length %lu, "
+ trace("data length %lu, offset %lu from length %u, "
"%s:%i", len, offset, p->pkt[index].len,
func, line);
}