]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
logger: initialize socket credentials contol union
authorKarel Zak <kzak@redhat.com>
Mon, 26 Jun 2023 09:56:23 +0000 (11:56 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 26 Jun 2023 09:56:23 +0000 (11:56 +0200)
Addresses: https://github.com/util-linux/util-linux/issues/2336
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/logger.c

index e2b0b41abe853a9e46f3b130033b2f9c9cda1207..8174d55e0f92837c6013cb4c29c62d8b8cdd5af9 100644 (file)
@@ -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 */