diff options
| author | Carmine Scarpitta <cscarpit@cisco.com> | 2023-09-15 12:30:39 +0200 |
|---|---|---|
| committer | Carmine Scarpitta <cscarpit@cisco.com> | 2023-09-15 17:42:04 +0200 |
| commit | 9de5b3bf58988b4ec5d663aaebda8906126ad29f (patch) | |
| tree | 84ab00aeafffc7b15517ab186c85971d1f75dc94 /pathd/path_pcep_debug.c | |
| parent | f3b4e6664fb8476342dbc90bb6016dac20c5cace (diff) | |
isisd: Fix CID 1568133 (Null pointer dereference)
Null checking the `sra` pointer after dereferencing it causes a
coverity issue. Let's perform the null check before dereferencing the
pointer.
Fixes this coverity issue:
*** CID 1568133: Null pointer dereferences (REVERSE_INULL)
/isisd/isis_zebra.c: 1077 in isis_zebra_srv6_adj_sid_uninstall()
1071 enum seg6local_action_t action = ZEBRA_SEG6_LOCAL_ACTION_UNSPEC;
1072 struct interface *ifp;
1073 uint16_t prefixlen = IPV6_MAX_BITLEN;
1074 struct isis_circuit *circuit = sra->adj->circuit;
1075 struct isis_area *area = circuit->area;
1076
>>> CID 1568133: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "sra" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
1077 if (!sra)
1078 return;
1079
1080 switch (sra->behavior) {
1081 case SRV6_ENDPOINT_BEHAVIOR_END_X:
1082 prefixlen = IPV6_MAX_BITLEN;
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Diffstat (limited to 'pathd/path_pcep_debug.c')
0 files changed, 0 insertions, 0 deletions
