From c222aa61d685d483ac21245d51a0ed013897517a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Fingen?= Date: Tue, 1 Aug 2017 11:38:19 +0200 Subject: [PATCH] ospf: Fix segfault if compiled with DEBUG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If OSPF_LS_REFRESH_TIME is 60, min_delay in ospf_refresher_register_lsa function (ospf_lsa.c) would be negative, so index (which is unsigned) would be out of range, causing a segfault. Signed-off-by: ßingen --- lib/libospf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libospf.h b/lib/libospf.h index a1ff9c24a2..ec6e642f89 100644 --- a/lib/libospf.h +++ b/lib/libospf.h @@ -35,7 +35,7 @@ /* Architectual Constants */ #ifdef DEBUG -#define OSPF_LS_REFRESH_TIME 60 +#define OSPF_LS_REFRESH_TIME 120 #else #define OSPF_LS_REFRESH_TIME 1800 #endif