Project

General

Profile

Bug #6247

Range not checked for day of year

Added by rubysubmit (Ruby Submit) over 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 1.9.2p290
Backport:
[ruby-core:44088]

Description

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.

Updated by naruse (Yui NARUSE) over 8 years ago

  • Status changed from Open to Assigned
  • Assignee set to tadf (tadayoshi funaba)

Updated by tadf (tadayoshi funaba) over 8 years ago

  • Assignee changed from tadf (tadayoshi funaba) to akr (Akira Tanaka)
#3

Updated by akr (Akira Tanaka) over 7 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r40165.
Ruby, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • strftime.c (rb_strftime_with_timespec): Test yday range. [ruby-core:44088] [Bug #6247] reported by Ruby Submit.

Also available in: Atom PDF