From 0d18e5cab2159b55cb56962711d428246c197929 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 25 Nov 2018 00:42:56 +0100 Subject: ntpd: do not SEGV on "-p keyno:192.168.1.1", show --help instead Signed-off-by: Denys Vlasenko --- networking/ntpd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/networking/ntpd.c b/networking/ntpd.c index 4f86072..041cac7 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 = ':'; -- cgit v1.1