Skip to content

head: errors on very large argument to -c but shouldn't #7166

@jfinkels

Description

@jfinkels

Environment: Ubuntu 20.04, uutils main branch (git commit d39dcad), GNU coreutils v9.6.3-3189c-dirty.

Steps to reproduce:

head --bytes=-18446744073709551616000 < /dev/null

What happens now: uutils head complains that the number is too large:

head: invalid number of bytes: '18446744073709551616000': Value too large for defined data type

What I expected to happen: GNU head terminates successfully with no output.

Notes: this is causing a failure in the GNU test file tests/head/head-c.sh.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions