From 827d0c30adc4519fafa7a9c725ff355b1d4fa3bd Mon Sep 17 00:00:00 2001 From: Caitlyn Stewart Date: Tue, 27 May 2025 13:09:24 +0100 Subject: [PATCH] connection: fix segfault in wl_closure_invoke() Signed-off-by: Caitlyn Stewart --- src/connection.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/connection.c b/src/connection.c index 34495211..3ef8688d 100644 --- a/src/connection.c +++ b/src/connection.c @@ -1229,6 +1229,11 @@ wl_closure_invoke(struct wl_closure *closure, uint32_t flags, count + 2, &ffi_type_void, ffi_types); implementation = target->implementation; + if (!implementation) { + wl_abort("Implementation of resource %d of %s is NULL\n", + target->id, target->interface->name); + } + if (!implementation[opcode]) { wl_abort("listener function for opcode %u of %s is NULL\n", opcode, target->interface->name);