summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-06 07:39:40 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-06 07:39:40 +0000
commitad837e5a1286ea79e563d3fb928695b171badb83 (patch)
tree3a74bbb73bf9a82089962b38d000b8e6e4698867
parent25f531a9247e24d4d5e50d8e9da0feb6e6c3ef4b (diff)
merge rivision(s) 33685:
* win32/win32.c (unixtime_to_filetime): should check the return value of localtime(). reported by snowjail at gmail.com. [ruby-dev:44838] [Bug #5596] [Backport #5596] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--version.h2
-rw-r--r--win32/win32.c3
3 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 095e87488f..8af2f57c43 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Feb 6 16:38:56 2012 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]
+
Mon Feb 6 16:36:25 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (rb_update_max_fd): fstat(2) can fail with other than
diff --git a/version.h b/version.h
index 496ecf66d5..25cccf6e7f 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 35
+#define RUBY_PATCHLEVEL 36
#define RUBY_RELEASE_DATE "2012-02-06"
#define RUBY_RELEASE_YEAR 2012
diff --git a/win32/win32.c b/win32/win32.c
index 759762b89a..977628126a 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -5460,6 +5460,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;