diff options
| author | Louis Scalbert <louis.scalbert@6wind.com> | 2024-04-23 11:39:29 +0200 | 
|---|---|---|
| committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-04-24 11:26:46 +0000 | 
| commit | c5eff5e1a171089a267307a4690ba72a9601528a (patch) | |
| tree | 6dc71ebd2614da8d7a539bd18e3ee7d08eb72066 /bgpd/bgp_snmp_bgp4.c | |
| parent | 11a9bc296c6a1425202dd3fe26e377e160d907a2 (diff) | |
Revert "bgpd: fix pointer arithmetic in bgp snmp module"
This reverts commit d9bd9ebbf1c3ab902133e7f47c4b8c073e2df3d4.
The previous code was correct even if the coverity scanner was
complaining.
Fixes: https://github.com/FRRouting/frr/issues/15680
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
(cherry picked from commit c1124a44c34f5fdce5fd06a6441ea78f8b5f352b)
Diffstat (limited to 'bgpd/bgp_snmp_bgp4.c')
| -rw-r--r-- | bgpd/bgp_snmp_bgp4.c | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgp_snmp_bgp4.c b/bgpd/bgp_snmp_bgp4.c index 692e232a83..0c391b621e 100644 --- a/bgpd/bgp_snmp_bgp4.c +++ b/bgpd/bgp_snmp_bgp4.c @@ -401,7 +401,7 @@ static struct bgp_path_info *bgp4PathAttrLookup(struct variable *v, oid name[],  		/* Set OID offset for prefix. */  		offset = name + v->namelen;  		oid2in_addr(offset, IN_ADDR_SIZE, &addr->prefix); -		offset++; +		offset += IN_ADDR_SIZE;  		/* Prefix length. */  		addr->prefixlen = *offset; @@ -497,7 +497,7 @@ static struct bgp_path_info *bgp4PathAttrLookup(struct variable *v, oid name[],  				offset = name + v->namelen;  				oid_copy_in_addr(offset, &rn_p->u.prefix4); -				offset++; +				offset += IN_ADDR_SIZE;  				*offset = rn_p->prefixlen;  				offset++;  				oid_copy_in_addr(offset,  | 
