summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2021-08-23 15:52:34 +0200
committerDenys Vlasenko2021-08-23 15:52:34 +0200
commit60f4843468213324cc348af9d8ec09648b6f6784 (patch)
tree2c41deef9704be6c1a0492270e80de567386ec6b
parentd59f539d577ebf6100f1292e27560514e8a18195 (diff)
downloadbusybox-60f4843468213324cc348af9d8ec09648b6f6784.zip
busybox-60f4843468213324cc348af9d8ec09648b6f6784.tar.gz
shuf: with -i LOW-HIGH, do not allow any argv's
function old new delta shuf_main 436 441 +5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--coreutils/shuf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/coreutils/shuf.c b/coreutils/shuf.c
index 4b41d5e..fc96351 100644
--- a/coreutils/shuf.c
+++ b/coreutils/shuf.c
@@ -92,6 +92,9 @@ int shuf_main(int argc, char **argv)
char *dash;
unsigned lo, hi;
+ if (argv[0])
+ bb_show_usage();
+
dash = strchr(opt_i_str, '-');
if (!dash) {
bb_error_msg_and_die("bad range '%s'", opt_i_str);