ls: `--block-size=0` is accepted when `--si` comes later
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start at the ls option parsing and validation for --block-size, then compare how --si and -h affect validation when they appear before or after it. Reproduce with the command shown and check the existing test coverage for block-size options. Done when --block-size=0 is rejected with exit status 2 regardless of option order, while the valid ls -h --block-size=0 behavior is preserved.
Written by the indexing model from the issue text.
Description
$ touch a.txt
$ ls --block-size=0 --si a.txt; echo $?
GNU:
ls: invalid --block-size argument '0'
2
uutils prints a.txt and exits 0. ls -h --block-size=0 is already rejected correctly, but the block size is not validated when --si or -h comes after it.
Reported in #15254 (found by a differential fuzzer; reproduced against GNU coreutils 9.12).
- Dominant language
- Rust
- Stars
- 24.3k
- Forks
- 2.1k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 357
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from uutils/coreutils
-
B - high priority U - ln
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
uutils/coreutils#15980 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
uutils/coreutils#15962 · 3 comments ·
Maintainers usually reply within 1 day
-
B - high priority U - tr
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
U - df
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
U - mv
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
All issues in uutils/coreutils
Similar issues
-
priority middle
Difficulty 1/5 Under an hour Newbie friendliness 62/100
KATO-Hiro/AtCoderClans#12940 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
o8 next debug build aborts on Glass to Dark appearance switch (nil identifier messaged before check)Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
hurttlocker/o8#5112 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day