2084db2eab (master): [ruby/date] Validate the commercial week range before conversion

0 views
Skip to first unread message

Nobuyoshi Nakada

unread,
Aug 28, 2026, 11:59:09 AM (4 days ago) Aug 28
to ruby...@g.ruby-lang.org
Nobuyoshi Nakada 2026-08-28 14:57:13 +0000 (Fri, 28 Aug 2026)

New Revision: 2084db2eab

https://github.com/ruby/ruby/commit/2084db2eab

Log:
[ruby/date] Validate the commercial week range before conversion

Reject week numbers outside -53..-1 and 1..53 before conversion so
integer overflow cannot make invalid input appear valid.

Fixes https://github.com/ruby/date/pull/180.

https://github.com/ruby/date/commit/e9c07010c7

Modified files:
ext/date/date_core.c
test/date/test_date_new.rb
Reply all
Reply to author
Forward
0 new messages