diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-11 15:05:51 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-11 15:05:51 +0000 |
commit | 94884eb4866815e63293a6261f974601ce95b1dd (patch) | |
tree | 313ae026e637d666a9ad53b98f265878bb89796d | |
parent | 0e52541917a80a4c5aee9d32fcc81cf9967f2aed (diff) | |
download | busybox-w32-94884eb4866815e63293a6261f974601ce95b1dd.tar.gz busybox-w32-94884eb4866815e63293a6261f974601ce95b1dd.tar.bz2 busybox-w32-94884eb4866815e63293a6261f974601ce95b1dd.zip |
time: don't segfault with no arguments
-rw-r--r-- | miscutils/time.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) | |||
402 | const char *output_format = default_format; | 402 | const char *output_format = default_format; |
403 | int opt; | 403 | int opt; |
404 | 404 | ||
405 | opt_complementary = "-1"; /* at least one arg */ | ||
405 | /* "+": stop on first non-option */ | 406 | /* "+": stop on first non-option */ |
406 | opt = getopt32(argv, "+vp"); | 407 | opt = getopt32(argv, "+vp"); |
407 | argv += optind; | 408 | argv += optind; |