From 60f4843468213324cc348af9d8ec09648b6f6784 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 23 Aug 2021 15:52:34 +0200 Subject: 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 --- coreutils/shuf.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'coreutils') diff --git a/coreutils/shuf.c b/coreutils/shuf.c index 4b41d5e71..fc9635147 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); -- cgit v1.2.1