Skip to content

ls: --block-size=0 is accepted when --si comes later #16008

Open

Description

@sylvestre
$ 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions