diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-11-25 00:42:56 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-11-25 00:42:56 +0100 |
commit | 0d18e5cab2159b55cb56962711d428246c197929 (patch) | |
tree | dc8a1a9ad5aaa24cdc097877a056fcb29aec24a7 /networking | |
parent | 5084bae61aac86fc6d13d48e59f5b98908de7d31 (diff) | |
download | busybox-0d18e5cab2159b55cb56962711d428246c197929.tar.gz |
ntpd: do not SEGV on "-p keyno:192.168.1.1", show --help instead
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r-- | networking/ntpd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/networking/ntpd.c b/networking/ntpd.c index 4f8607244..041cac762 100644 --- a/networking/ntpd.c +++ b/networking/ntpd.c @@ -2539,6 +2539,7 @@ static NOINLINE void ntp_init(char **argv) int key_id; peer += 6; end = strchr(peer, ':'); + if (!end) bb_show_usage(); *end = '\0'; key_id = xatou_range(peer, 1, MAX_KEY_NUMBER); *end = ':'; |