[git commit] ntpd: abort if argvs are (unexpectedly) given

Denys Vlasenko vda.linux at googlemail.com
Tue Jul 2 09:28:18 UTC 2019


commit: https://git.busybox.net/busybox/commit/?id=caecfdc20d450686cd1f7e9b5f650322f894b3c2
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 networking/ntpd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/networking/ntpd.c b/networking/ntpd.c
index cd6da2b38..d55b070c5 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -2436,7 +2436,8 @@ static NOINLINE void ntp_init(char **argv)
 			"d" /* compat */
 			"46aAbgL" /* compat, ignored */
 				"\0"
-				"dd:wn"  /* -d: counter; -p: list; -w implies -n */
+				"=0"      /* should have no arguments */
+				":dd:wn"  /* -d: counter; -p: list; -w implies -n */
 				IF_FEATURE_NTPD_SERVER(":Il") /* -I implies -l */
 			IF_FEATURE_NTP_AUTH(, &key_file_path)
 			, &peers, &G.script_name


More information about the busybox-cvs mailing list