From 3b59942da4bd157ed9a4a5d12e2f62317e2c61e3 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 26 Jun 2023 11:56:23 +0200 Subject: [PATCH] logger: initialize socket credentials contol union Addresses: https://github.com/util-linux/util-linux/issues/2336 Signed-off-by: Karel Zak --- misc-utils/logger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc-utils/logger.c b/misc-utils/logger.c index e2b0b41abe..8174d55e0f 100644 --- a/misc-utils/logger.c +++ b/misc-utils/logger.c @@ -471,7 +471,7 @@ static void write_output(struct logger_ctl *ctl, const char *const msg) union { struct cmsghdr cmh; char control[CMSG_SPACE(sizeof(struct ucred))]; - } cbuf; + } cbuf = { .control = { 0 } }; #endif /* 4) add extra \n to make sure message is terminated */ -- 2.47.2