uutils/coreutils

Date rejects valid large years that GNU date accepts

Open

#9774 aperta il 22 dic 2025

Vedi su GitHub
 (6 commenti) (0 reazioni) (0 assegnatari)Rust (1852 fork)batch import
U - datefuzzinggood first issue

Metriche repository

Star
 (23.246 star)
Metriche merge PR
 (Merge medio 9g 14h) (216 PR mergiate in 30 g)

Descrizione

GNU:

  $ LANG=C TZ=UTC0 /usr/bin/date -d "18978-01-01"
  Thu Jan  1 00:00:00 UTC 18978

Rust:

  $ LANG=C TZ=UTC0 ./target/debug/date -d "18978-01-01"
  date: invalid date '18978-01-01'
  • GNU date: Accepts year 18978 and outputs the date correctly
  • Rust date: Rejects year 18978 as invalid date, appears to have a limit around year 9999
  • GNU date supports much larger year ranges than our implementation

Found with a fuzzer

Guida contributor