]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Abort on parse errors in refclock directive
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 5 Jun 2013 09:48:48 +0000 (11:48 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 5 Jun 2013 09:48:48 +0000 (11:48 +0200)
conf.c

diff --git a/conf.c b/conf.c
index a9e4f934f74bccbc5f0afe03aac6a7890807836a..734d1f7c9b5f25ae0b9244094c19013117332051 100644 (file)
--- a/conf.c
+++ b/conf.c
@@ -647,12 +647,16 @@ parse_refclock(char *line)
       n = 0;
       sel_option = SRC_SelectPrefer;
     } else {
-      other_parse_error("Invalid refclock parameter");
       break;
     }
     line += n;
   }
 
+  if (*line) {
+    other_parse_error("Invalid/unreadable refclock parameter");
+    return;
+  }
+
   refclock_sources[i].driver_name = name;
   refclock_sources[i].driver_parameter = param;
   refclock_sources[i].driver_poll = dpoll;