mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-02 18:44:19 +00:00
bgpd: Use string length not sizeof the array
strlen is the same as sizeof when the memory is dynamically allocated but it is not the same when the memory being looked at is an array. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
5414658aa5
commit
a7e046a20a
@ -173,7 +173,7 @@ lcommunity_list_match_delete(struct lcommunity *lcom,
|
||||
|
||||
static inline uint32_t bgp_clist_hash_key(char *name)
|
||||
{
|
||||
return jhash(name, sizeof(name), 0xdeadbeaf);
|
||||
return jhash(name, strlen(name), 0xdeadbeaf);
|
||||
}
|
||||
|
||||
#endif /* _QUAGGA_BGP_CLIST_H */
|
||||
|
Loading…
Reference in New Issue
Block a user