From: Denis Vlasenko Date: Mon, 28 Apr 2008 00:10:34 +0000 (-0000) Subject: date: complain if there are extraneout arguments X-Git-Tag: 1_11_0~278 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e6520f05328c38333284df5f42b9c2bfb7c4fec9;p=oweals%2Fbusybox.git date: complain if there are extraneout arguments --- diff --git a/coreutils/date.c b/coreutils/date.c index 2aecbaac2..2c61aa646 100644 --- a/coreutils/date.c +++ b/coreutils/date.c @@ -79,6 +79,8 @@ int date_main(int argc ATTRIBUTE_UNUSED, char **argv) if (!(opt & (DATE_OPT_SET | DATE_OPT_DATE))) { opt |= DATE_OPT_SET; date_str = argv[0]; /* can be NULL */ + } else if (argv[0]) { + bb_show_usage(); } /* Now we have parsed all the information except the date format