Skip to content

bug(ptx): when -w is a large number then panics #12788

Description

@HackingRepo

Hi, uutils mainteners

ptx panics when the -w option is a large number instead of erroing out like the GNU ptx

to reproduce that, i used

relunsec@relunsec:~/software/coreutils/target/debug$ ./ptx -w 99999999999 a
memory allocation of 49999999999 bytes failed
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted                    (core dumped) ./ptx -w 99999999999 a
relunsec@relunsec:~/software/coreutils/target/debug$ 

then i compared it with GNU ptx as i see no panic when -2 is a large number

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    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