commit | 0d18e5cab2159b55cb56962711d428246c197929 | [log] [tgz] |
---|---|---|
author | Denys Vlasenko <vda.linux@googlemail.com> | Sun Nov 25 00:42:56 2018 +0100 |
committer | Denys Vlasenko <vda.linux@googlemail.com> | Sun Nov 25 00:42:56 2018 +0100 |
tree | dc8a1a9ad5aaa24cdc097877a056fcb29aec24a7 | |
parent | 5084bae61aac86fc6d13d48e59f5b98908de7d31 [diff] |
ntpd: do not SEGV on "-p keyno:192.168.1.1", show --help instead Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
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 @@ 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 = ':';