From: Denis Vlasenko Date: Fri, 11 Jul 2008 15:05:51 +0000 (-0000) Subject: time: don't segfault with no arguments X-Git-Tag: 1_12_0~207 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=94884eb4866815e63293a6261f974601ce95b1dd;p=oweals%2Fbusybox.git time: don't segfault with no arguments --- diff --git a/miscutils/time.c b/miscutils/time.c index d8b8aa0c5..dbc92d12f 100644 --- a/miscutils/time.c +++ b/miscutils/time.c @@ -402,6 +402,7 @@ int time_main(int argc UNUSED_PARAM, char **argv) const char *output_format = default_format; int opt; + opt_complementary = "-1"; /* at least one arg */ /* "+": stop on first non-option */ opt = getopt32(argv, "+vp"); argv += optind;