uutils/coreutils

Date rejects valid large years that GNU date accepts

Fechada

#9.774 aberto em 22 de dez. de 2025

 (6 comentários) (0 reação) (0 responsável)Rust (1.981 forks)batch import
U - datefuzzinggood first issue

Métricas do repositório

Stars
 (23.893 estrelas)
Métricas de merge de PR
 (Mesclagem média 5d 23h) (239 fundiu PRs em 30d)

Description

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

Guia do colaborador