Skip to content

bug(printf): panics when using a number like %-101727s #12900

@HackingRepo

Description

@HackingRepo

Hi, uutils mainteners

printfr panic when using too smal negative numbers. as we confirmed

relunsec@relunsec:~/software/coreutils/target/debug$ ./printf "Padding: |%-101727s|\n" "abc"

thread 'main' (45664) panicked at src/uucore/src/lib/features/format/spec.rs:559:9:
Formatting argument out of range
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Padding: |abc

note in the time the panic in line 559 which different code, so not duplicate, the previous one yes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions