From d83a854b5b364460cad1d271a7a771b5814466a2 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Tue, 19 Nov 2019 21:47:40 -0500 Subject: [PATCH] pimd: fix bsm buflen check to include pim hdr Signed-off-by: Quentin Young --- pimd/pim_bsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pimd/pim_bsm.c b/pimd/pim_bsm.c index 65d6029585..4a69e4d1ab 100644 --- a/pimd/pim_bsm.c +++ b/pimd/pim_bsm.c @@ -1267,7 +1267,7 @@ int pim_bsm_process(struct interface *ifp, struct ip *ip_hdr, uint8_t *buf, return -1; } - if (buf_size < sizeof(struct bsm_hdr)) { + if (buf_size < (PIM_MSG_HEADER_LEN + sizeof(struct bsm_hdr))) { if (PIM_DEBUG_BSM) zlog_debug("%s: received buffer length of %d which is too small to properly decode", __PRETTY_FUNCTION__, buf_size); -- 2.39.5