]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
conf: fix missing format string
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 10 Jun 2020 13:54:11 +0000 (15:54 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 10 Jun 2020 13:55:32 +0000 (15:55 +0200)
Fixes: 519796de3756 ("conf: add sourcedirs directive")
conf.c

diff --git a/conf.c b/conf.c
index 406829f450d7f57b38cac104b45cf88e9ff5ee9e..cd775bfe62e2330311a11d22c27bd7df5013aa5d 100644 (file)
--- a/conf.c
+++ b/conf.c
@@ -1670,7 +1670,7 @@ reload_source_dirs(void)
   /* Load the sources again */
   ARR_SetSize(ntp_sources, 0);
   for (i = 0; i < ARR_GetSize(ntp_source_dirs); i++) {
-    if (snprintf(buf, sizeof (buf),
+    if (snprintf(buf, sizeof (buf), "%s",
                  *(char **)ARR_GetElement(ntp_source_dirs, i)) >= sizeof (buf))
       assert(0);
     search_dirs(buf, ".sources", load_source_file);