Fix crash in config parsing with too many servers
This commit is contained in:
parent
6eafff2450
commit
0655def57f
1 changed files with 3 additions and 0 deletions
3
conf.c
3
conf.c
|
@ -395,6 +395,9 @@ parse_source(const char *line, NTP_Source_Type type)
|
||||||
{
|
{
|
||||||
CPS_Status status;
|
CPS_Status status;
|
||||||
|
|
||||||
|
if (n_ntp_sources >= MAX_NTP_SOURCES)
|
||||||
|
return;
|
||||||
|
|
||||||
ntp_sources[n_ntp_sources].type = type;
|
ntp_sources[n_ntp_sources].type = type;
|
||||||
status = CPS_ParseNTPSourceAdd(line, &ntp_sources[n_ntp_sources].params);
|
status = CPS_ParseNTPSourceAdd(line, &ntp_sources[n_ntp_sources].params);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue