mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 07:37:29 +00:00
bgpd: avoid memcmp(NULL, NULL)
Undefined behavior Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
eada87a4ab
commit
5dd7070f73
@ -152,8 +152,9 @@ static bool cluster_hash_cmp(const void *p1, const void *p2)
|
|||||||
const struct cluster_list *cluster2 = p2;
|
const struct cluster_list *cluster2 = p2;
|
||||||
|
|
||||||
return (cluster1->length == cluster2->length
|
return (cluster1->length == cluster2->length
|
||||||
&& memcmp(cluster1->list, cluster2->list, cluster1->length)
|
&& (cluster1->list == cluster2->list
|
||||||
== 0);
|
|| memcmp(cluster1->list, cluster2->list, cluster1->length)
|
||||||
|
== 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cluster_free(struct cluster_list *cluster)
|
static void cluster_free(struct cluster_list *cluster)
|
||||||
|
Loading…
Reference in New Issue
Block a user