Acked-by: Donald Sharp <sha...@cumulusnetworks.com>

On Tue, Jun 14, 2016 at 2:07 PM, Christian Franke <
ch...@opensourcerouting.org> wrote:

> From: Christian Franke <nob...@nowhere.ws>
>
> The loop should only iterate to array_size - 1.
>
> Signed-off-by: Christian Franke <ch...@opensourcerouting.org>
> ---
>  ospf6d/ospf6_spf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c
> index 6d2e536..c3431c3 100644
> --- a/ospf6d/ospf6_spf.c
> +++ b/ospf6d/ospf6_spf.c
> @@ -402,7 +402,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))
>         {
> --
> 2.8.0
>
>
> _______________________________________________
> Quagga-dev mailing list
> Quagga-dev@lists.quagga.net
> https://lists.quagga.net/mailman/listinfo/quagga-dev
>
_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to