diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2021-08-23 15:52:34 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-08-23 15:52:34 +0200 |
commit | 60f4843468213324cc348af9d8ec09648b6f6784 (patch) | |
tree | 2c41deef9704be6c1a0492270e80de567386ec6b /coreutils | |
parent | d59f539d577ebf6100f1292e27560514e8a18195 (diff) | |
download | busybox-w32-60f4843468213324cc348af9d8ec09648b6f6784.tar.gz busybox-w32-60f4843468213324cc348af9d8ec09648b6f6784.tar.bz2 busybox-w32-60f4843468213324cc348af9d8ec09648b6f6784.zip |
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>
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/shuf.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) | |||
92 | char *dash; | 92 | char *dash; |
93 | unsigned lo, hi; | 93 | unsigned lo, hi; |
94 | 94 | ||
95 | if (argv[0]) | ||
96 | bb_show_usage(); | ||
97 | |||
95 | dash = strchr(opt_i_str, '-'); | 98 | dash = strchr(opt_i_str, '-'); |
96 | if (!dash) { | 99 | if (!dash) { |
97 | bb_error_msg_and_die("bad range '%s'", opt_i_str); | 100 | bb_error_msg_and_die("bad range '%s'", opt_i_str); |