From:   Sylvestre Ledru
Subject: [patch] date: reject invalid -d values
Date:   Sun, 4 Jan 2026 18:41:30 +0100

>-d accepts some invalid inputs. For example:

>$ /usr/bin/date -d "("
>Sun Jan  4 00:00:00 CET 2026

>The patch in gnulib rejects it, the other add a test in coreutils

>with the patch:
>$ ./src/date -d '('
>date: invalid date '('

>Note that  /usr/bin/date -d "[", ".", "^" already generate an error

>(found with a differential fuzzer)

Perhaps related.  I discovered some time back that "date -d -z"
produces a seemingly random (but not flagged as invalid) result.  As
do some (but not all) other '-[X]' args.

=================================================================================
Please do not send me replies to my posts on the list.
I always read the replies via the web archive, so CC'ing to me is unnecessary.

When responding to my posts, please try to refrain from giving bureaucratic 
answers.
If you have nothing useful to say, then just click Next and go on.

Reply via email to