mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 03:33:43 +00:00
Merge pull request #2507 from pacovn/Coverity_1436344_1451361_Dereference_after_null_check
bgpd, lib: null check (Coverity 1436344, 1451361)
This commit is contained in:
commit
50f08ff26a
@ -1054,6 +1054,9 @@ int extcommunity_list_set(struct community_list_handler *ch, const char *name,
|
||||
struct ecommunity *ecom = NULL;
|
||||
regex_t *regex = NULL;
|
||||
|
||||
if (str == NULL)
|
||||
return COMMUNITY_LIST_ERR_MALFORMED_VAL;
|
||||
|
||||
entry = NULL;
|
||||
|
||||
/* Get community list. */
|
||||
@ -1089,7 +1092,7 @@ int extcommunity_list_set(struct community_list_handler *ch, const char *name,
|
||||
entry = community_entry_new();
|
||||
entry->direct = direct;
|
||||
entry->style = style;
|
||||
entry->any = (str ? 0 : 1);
|
||||
entry->any = 0;
|
||||
if (ecom)
|
||||
entry->config = ecommunity_ecom2str(
|
||||
ecom, ECOMMUNITY_FORMAT_COMMUNITY_LIST, 0);
|
||||
|
@ -609,6 +609,7 @@ static struct list *disambiguate(struct list *first, struct list *second,
|
||||
vector vline, unsigned int n)
|
||||
{
|
||||
// doesn't make sense for these to be inequal length
|
||||
assert(first && second);
|
||||
assert(first->count == second->count);
|
||||
assert(first->count == vector_active(vline) - n + 1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user