From: Quentin Young Date: Wed, 20 Nov 2019 02:47:40 +0000 (-0500) Subject: pimd: fix bsm buflen check to include pim hdr X-Git-Tag: base_7.3~147^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F5383%2Fhead;p=mirror%2Ffrr.git pimd: fix bsm buflen check to include pim hdr Signed-off-by: Quentin Young --- 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);