mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-16 11:34:14 +00:00
bgpd: fix pointer arithmetic in bgp snmp module
Fix a bgpd coverity warning in an snmp module. Signed-off-by: Mark Stapp <mjs@labn.net>
This commit is contained in:
parent
438ef98701
commit
d9bd9ebbf1
@ -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 += IN_ADDR_SIZE;
|
||||
offset++;
|
||||
|
||||
/* 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 += IN_ADDR_SIZE;
|
||||
offset++;
|
||||
*offset = rn_p->prefixlen;
|
||||
offset++;
|
||||
oid_copy_in_addr(offset,
|
||||
|
Loading…
Reference in New Issue
Block a user