mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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:
parent
9cd8b76e6d
commit
572e4807e6
2 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue