From 47d4c563f4eacc9557904c3bf9bccfce519581b0 Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Fri, 1 Aug 2025 14:50:36 +0100 Subject: [PATCH] evdev: remove duplicate sizeof This looks like a copy-and-paste error. In practice it was harmless on 64-bit systems because evdev_event happens to be 64 bits long, but on 32-bit systems it would allocate too little memory. Found by GCC 15 with _FORTIFY_SOURCE=3 on ia32. Part-of: --- src/evdev-frame.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/evdev-frame.h b/src/evdev-frame.h index 965dbc24..ccf6f385 100644 --- a/src/evdev-frame.h +++ b/src/evdev-frame.h @@ -509,7 +509,7 @@ static inline struct evdev_frame * evdev_frame_new(size_t max_size) { struct evdev_frame *frame = - zalloc(max_size * sizeof(sizeof(*frame->events)) + sizeof(*frame)); + zalloc(max_size * sizeof(*frame->events) + sizeof(*frame)); frame->refcount = 1; frame->max_size = max_size; -- GitLab