]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Fixed pointer calculation issue in lcommunity
authorNigel Kukard <nkukard@lbsd.net>
Fri, 1 Sep 2017 23:36:11 +0000 (23:36 +0000)
committerNigel Kukard <nkukard@lbsd.net>
Sat, 2 Sep 2017 01:17:04 +0000 (01:17 +0000)
Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
bgpd/bgp_clist.c

index 48fc8474dbad0a7a24e581fef42df422cf07fab1..886de9e50c256578307b61a248e07ed93c4aa9e2 100644 (file)
@@ -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);