From c2fb17b549f087d5c135f6840716b70fa589e55c Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Mon, 16 Apr 2018 14:48:24 -0400 Subject: [PATCH] lib: initialize imsg_hdr Not fully initialized. Signed-off-by: Quentin Young --- lib/imsg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/imsg.c b/lib/imsg.c index 0ea1dd6302..6419f805ab 100644 --- a/lib/imsg.c +++ b/lib/imsg.c @@ -241,6 +241,8 @@ struct ibuf *imsg_create(struct imsgbuf *ibuf, uint32_t type, uint32_t peerid, struct ibuf *wbuf; struct imsg_hdr hdr; + memset(&hdr, 0x00, IMSG_HEADER_SIZE); + datalen += IMSG_HEADER_SIZE; if (datalen > MAX_IMSGSIZE) { errno = ERANGE; -- 2.39.5