From 0655def57f0422cb67640d7093dc001889fe0021 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Fri, 26 Apr 2013 14:17:21 +0200 Subject: [PATCH] Fix crash in config parsing with too many servers --- conf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf.c b/conf.c index fbb0090..3b691f1 100644 --- a/conf.c +++ b/conf.c @@ -395,6 +395,9 @@ parse_source(const char *line, NTP_Source_Type type) { CPS_Status status; + if (n_ntp_sources >= MAX_NTP_SOURCES) + return; + ntp_sources[n_ntp_sources].type = type; status = CPS_ParseNTPSourceAdd(line, &ntp_sources[n_ntp_sources].params);