From: Nigel Kukard Date: Fri, 1 Sep 2017 23:36:11 +0000 (+0000) Subject: bgpd: Fixed pointer calculation issue in lcommunity X-Git-Tag: frr-4.0-dev~348^2~2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=ff9104a208d2806d2996c538f081d495df4a2e74;p=mirror%2Ffrr.git bgpd: Fixed pointer calculation issue in lcommunity Signed-off-by: Nigel Kukard --- 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);