From 9cb3d7aa9dc995ffafdbdef7ab86a949d0fb0e7d Mon Sep 17 00:00:00 2001 From: Demi Marie Obenour Date: Mon, 5 Aug 2024 12:59:21 -0400 Subject: connection: Fix wrong format string Prevents undefined behavior if there is not enough space in the buffer for a queued message. Signed-off-by: Demi Marie Obenour --- src/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/connection.c b/src/connection.c index 1177d66..3449521 100644 --- a/src/connection.c +++ b/src/connection.c @@ -260,7 +260,7 @@ ring_buffer_ensure_space(struct wl_ring_buffer *b, size_t count) * allowed). */ if (net_size > size_pot(size_bits)) { - wl_log("Data too big for buffer (%d + %zd > %zd).\n", + wl_log("Data too big for buffer (%zu + %zu > %zu).\n", ring_buffer_size(b), count, size_pot(size_bits)); errno = E2BIG; return -1; -- cgit v1.2.3-70-g09d2