uutils/coreutils

Date rejects valid large years that GNU date accepts

クローズ

#9,774 opened on 2025/12/22

 (6 件のコメント) (0 件のリアクション) (0 人の担当者)Rust (2,003 件のフォーク)batch import
U - datefuzzinggood first issue

Repository metrics

Stars
 (23,984 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド