diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-12-14 10:08:27 +0200 |
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-12-14 10:08:27 +0200 |
| commit | 67116298cf7c791603a09faf1ddbe09eae3aba21 (patch) | |
| tree | 9143da13e9fb7824ef1274c7bc92940dd3ee1109 /tests/topotests/ospf_basic_functionality/test_ospf_ecmp.py | |
| parent | 22e60ca210dd312de6394ea5fcb03630bb490c08 (diff) | |
bgpd: Fix coverity FORWARD_NULL for v->namelen in SNMP code
```
*** CID 1529864: (FORWARD_NULL)
/bgpd/bgp_snmp_bgp4v2.c: 443 in bgp4v2PathAttrLookup()
437
438 #define BGP_NLRI_ENTRY_OFFSET (afi_len + 1 + afi_len)
439
440 sockunion_init(&su);
441
442 if (exact) {
>>> CID 1529864: (FORWARD_NULL)
>>> Dereferencing null pointer "v".
443 if (*length - v->namelen != BGP_NLRI_ENTRY_OFFSET)
444 return NULL;
445
446 /* Set OID offset for prefix */
447 offset = name + v->namelen;
448 if (family == AF_INET)
/bgpd/bgp_snmp_bgp4v2.c: 480 in bgp4v2PathAttrLookup()
474 bgp_dest_unlock_node(dest);
475 }
476
477 return NULL;
478 }
479
>>> CID 1529864: (FORWARD_NULL)
>>> Dereferencing null pointer "v".
480 offset = name + v->namelen;
481 offsetlen = *length - v->namelen;
482 len = offsetlen;
483
484 if (offsetlen == 0) {
485 dest = bgp_table_top(bgp->rib[afi][SAFI_UNICAST]);
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'tests/topotests/ospf_basic_functionality/test_ospf_ecmp.py')
0 files changed, 0 insertions, 0 deletions
