mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 20:55:25 +00:00
ospf6d: fix off-by-one on display of spf reasons
The loop should only iterate to array_size - 1. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: Christian Franke <chris@opensourcerouting.org> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
c8cdf5c774
commit
e531bbe2f0
@ -444,7 +444,7 @@ void ospf6_spf_reason_string (unsigned int reason, char *buf, int size)
|
||||
if (!buf)
|
||||
return;
|
||||
|
||||
for (bit = 0; bit <= (sizeof(ospf6_spf_reason_str) / sizeof(char *)); bit++)
|
||||
for (bit = 0; bit < array_size(ospf6_spf_reason_str); bit++)
|
||||
{
|
||||
if ((reason & (1 << bit)) && (len < size))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user