From 46a6060da2d649063ff8695791d56a1ba64178e9 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 29 Apr 2025 09:34:06 -0400 Subject: [PATCH] isisd: Fix run level for spf_run_count Running isis with undefined behavior compiled in gives you this warning: isisd/isis_spf.c:2126:22: runtime error: index 2 out of bounds for type '_uint64_t [2]' Looking at the rest of isis this should be level-1 because the declaration for spf_run_count only has 2 levels. Signed-off-by: Donald Sharp --- isisd/isis_spf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c index 5960fef755..48d7da4a92 100644 --- a/isisd/isis_spf.c +++ b/isisd/isis_spf.c @@ -2123,7 +2123,7 @@ static void isis_run_spf_cb(struct event *thread) } if (have_run) - area->spf_run_count[level]++; + area->spf_run_count[level - 1]++; isis_area_verify_routes(area); -- 2.39.5