Skip to content

bug(date): a file that contains \xFF, will lead to no error even with --debug and exits with status code 0 whiches success #12920

Description

@HackingRepo

Hi, uutils mainteners

that is a critical issue as i see, we used

relunsec@relunsec:~/software/coreutils/target/debug$ echo -n $'Hello\xFFUiOP:IOyutyrT%YUt' > date_file.txt
relunsec@relunsec:~/software/coreutils/target/debug$ ./date -f date_file.txt  --debug
relunsec@relunsec:~/software/coreutils/target/debug$ gnudate -f date_file.txt  --debug
date: error: unknown word 'HELLO'
date: error: parsing failed, stopped at '�UiOP:IOyutyrT%YUt'
gnudate: invalid date ‘Hello\377UiOP:IOyutyrT%YUt’
relunsec@relunsec:~/software/coreutils/target/debug$ 

as you can see the gnu one rejects it, and even worse for uu date it even with --debug silent and exit code 0 just adding \xFF breaks parsing
whiches weird and very bad bug to see at all

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