From: "rubysubmit (Ruby Submit)" Date: 2012-04-03T05:57:03+09:00 Subject: [ruby-core:44088] [ruby-trunk - Bug #6247][Open] Range not checked for day of year Issue #6247 has been reported by rubysubmit (Ruby Submit). ---------------------------------------- Bug #6247: Range not checked for day of year https://bugs.ruby-lang.org/issues/6247 Author: rubysubmit (Ruby Submit) Status: Open Priority: Low Assignee: Category: Target version: ruby -v: ruby 1.9.2p290 File: strftime.c case 'j': /* day of the year, 001 - 366 */ FMT('0', 3, "d", vtm->yday); continue; The range for the vtm->yday function is not checked as many of the other values are before formatting. The end result allows the day of year to be up to the size of a ushort. -- http://bugs.ruby-lang.org/