From f8b6c66f6b443226fedade5d72202aa6be743107 Mon Sep 17 00:00:00 2001 From: MrIron Date: Mon, 3 Nov 2025 13:40:08 +0100 Subject: [PATCH] fix: uninitialised bytes in kqueue engine --- ircd/engine_kqueue.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ircd/engine_kqueue.c b/ircd/engine_kqueue.c index a0d00dd6..4ba4f69d 100644 --- a/ircd/engine_kqueue.c +++ b/ircd/engine_kqueue.c @@ -39,6 +39,7 @@ #include #include #include +#include #define KQUEUE_ERROR_THRESHOLD 20 /**< after 20 kqueue errors, restart */ #define ERROR_EXPIRE_TIME 3600 /**< expire errors after an hour */ @@ -103,6 +104,7 @@ static void engine_signal(struct Signal* sig) { struct kevent sigevent; + memset(&sigevent, 0, sizeof(sigevent)); struct sigaction act; assert(0 != sig); @@ -166,6 +168,7 @@ set_or_clear(struct Socket* sock, unsigned int clear, unsigned int set) { int i = 0; struct kevent chglist[2]; + memset(chglist, 0, sizeof(chglist)); assert(0 != sock); assert(-1 < s_fd(sock));