summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_clist.c
diff options
context:
space:
mode:
authorNigel Kukard <nkukard@lbsd.net>2017-09-02 01:36:11 +0200
committerNigel Kukard <nkukard@lbsd.net>2017-09-02 03:17:04 +0200
commitff9104a208d2806d2996c538f081d495df4a2e74 (patch)
tree130360ec1102cc758ed8daa04949fcf42c9e4bfb /bgpd/bgp_clist.c
parentbgpd: Use lcommunity_new() to allocate new lcommunity (diff)
downloadfrr-ff9104a208d2806d2996c538f081d495df4a2e74.tar.xz
frr-ff9104a208d2806d2996c538f081d495df4a2e74.zip
bgpd: Fixed pointer calculation issue in lcommunity
Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
Diffstat (limited to 'bgpd/bgp_clist.c')
-rw-r--r--bgpd/bgp_clist.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/bgpd/bgp_clist.c b/bgpd/bgp_clist.c
index 48fc8474d..886de9e50 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);