* win32/win32.c (unixtime_to_filetime): should check the return value

of localtime().  reported by snowjail at gmail.com.
  [ruby-dev:44838] [Bug #5596]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2011-11-09 07:43:08 +00:00
Родитель 9cd8b76e6d
Коммит 572e4807e6
2 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -1,3 +1,9 @@
Wed Nov 9 16:40:49 2011 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (unixtime_to_filetime): should check the return value
of localtime(). reported by snowjail at gmail.com.
[ruby-dev:44838] [Bug #5596]
Thu Nov 10 05:17:25 2011 Koichi Sasada <ko1@atdot.net>
* cont.c (rb_fiber_m_transfer, rb_fiber_resume): prohibit using

Просмотреть файл

@ -5758,6 +5758,9 @@ unixtime_to_filetime(time_t time, FILETIME *ft)
FILETIME lt;
tm = localtime(&time);
if (!tm) {
return -1;
}
st.wYear = tm->tm_year + 1900;
st.wMonth = tm->tm_mon + 1;
st.wDayOfWeek = tm->tm_wday;