]> 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>
Sun, 3 Sep 2017 03:53:04 +0000 (03:53 +0000)
Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
bgpd/bgp_clist.c

index 2159c09d0838f34d05bd029b6a3a77e7a7ea20aa..7e0d03869e8db5a80285b242809cc84e7e833c3a 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);