From ff9104a208d2806d2996c538f081d495df4a2e74 Mon Sep 17 00:00:00 2001 From: Nigel Kukard Date: Fri, 1 Sep 2017 23:36:11 +0000 Subject: [PATCH] bgpd: Fixed pointer calculation issue in lcommunity Signed-off-by: Nigel Kukard --- bgpd/bgp_clist.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bgpd/bgp_clist.c b/bgpd/bgp_clist.c index 48fc8474db..886de9e50c 100644 --- a/bgpd/bgp_clist.c +++ b/bgpd/bgp_clist.c @@ -450,8 +450,7 @@ static char *lcommunity_str_get(struct lcommunity *lcom, int i) u_char *ptr; char *pnt; - ptr = lcom->val; - ptr += (i * LCOMMUNITY_SIZE); + ptr = lcom->val + (i * LCOMMUNITY_SIZE); memcpy(&lcomval, ptr, LCOMMUNITY_SIZE); -- 2.39.5