*** CID
1530035: Null pointer dereferences (FORWARD_NULL)
/bgpd/bgp_updgrp_packet.c: 756 in subgroup_update_packet()
750 * position.
751 */
752 mpattr_pos = stream_get_endp(s);
753
754 /* 5: Encode all the attributes, except MP_REACH_NLRI
755 * attr. */
>>> CID
1530035: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "path" to "bgp_packet_attribute", which dereferences it.
756 total_attr_len = bgp_packet_attribute(
757 NULL, peer, s, adv->baa->attr, &vecarr, NULL,
758 afi, safi, from, NULL, NULL, 0, 0, 0, path);
759
760 space_remaining =
761 STREAM_CONCAT_REMAIN(s, snlri, STREAM_SIZE(s))
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
}
/* AIGP */
- if (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_AIGP) &&
+ if (bpi && attr->flag & ATTR_FLAG_BIT(BGP_ATTR_AIGP) &&
(CHECK_FLAG(peer->flags, PEER_FLAG_AIGP) ||
peer->sort != BGP_PEER_EBGP)) {
/* At the moment only AIGP Metric TLV exists for AIGP