mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-06 15:15:07 -05:00
Fix crash in config parsing with too many servers
This commit is contained in:
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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user