mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-02 22:09:48 +00:00
bgpd: fix NULL pointer dereference bug
Other parts of the rfapi code check if the 'rfg->rfapi_import_table' pointer is NULL or not before using it. Do the same here to fix a crash detected by the CLI fuzzer. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
parent
8a00500231
commit
7f5f853d0b
@ -4845,6 +4845,10 @@ DEFUN (add_vrf_prefix_rd_label_pref,
|
||||
static int rfapi_cfg_group_it_count(struct rfapi_nve_group_cfg *rfg)
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
if (rfg->rfapi_import_table == NULL)
|
||||
return 0;
|
||||
|
||||
afi_t afi = AFI_MAX;
|
||||
while (afi-- > 0) {
|
||||
count += rfg->rfapi_import_table->local_count[afi];
|
||||
|
Loading…
Reference in New Issue
Block a user