mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
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 <demi@invisiblethingslab.com>
This commit is contained in:
parent
290c36bc50
commit
9cb3d7aa9d
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue