summaryrefslogtreecommitdiffstats
path: root/lib/imsg.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-04-16 20:48:24 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-04-17 19:58:24 +0200
commitc2fb17b549f087d5c135f6840716b70fa589e55c (patch)
tree9fdfc9cd1ab41863f175f33d3b5f8956844b7424 /lib/imsg.c
parentospfd: remove unnecessary assignment (diff)
downloadfrr-c2fb17b549f087d5c135f6840716b70fa589e55c.tar.xz
frr-c2fb17b549f087d5c135f6840716b70fa589e55c.zip
lib: initialize imsg_hdr
Not fully initialized. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/imsg.c')
-rw-r--r--lib/imsg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/imsg.c b/lib/imsg.c
index 0ea1dd630..6419f805a 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;