summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-11 14:26:57 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-11 14:26:57 +0000
commit8ce47e7a2670d174dbd7add0e9ee83904515e57b (patch)
treedc529bbf5918209faa799a5c84132bb58933f515
parenta260025a02ea425d59b8758b06832fb7fe23289a (diff)
* time.c (init_leap_second_info): check the result of
gmtime_with_leapsecond. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--time.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 63c9063934..fe3876feee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jun 11 23:21:35 2010 Tanaka Akira <akr@fsij.org>
+
+ * time.c (init_leap_second_info): check the result of
+ gmtime_with_leapsecond.
+
Fri Jun 11 22:39:50 2010 Yusuke Endoh <mame@tsg.ne.jp>
* lib/rubygems/install_update_options.rb
diff --git a/time.c b/time.c
index 75f1355286..534ab10c6c 100644
--- a/time.c
+++ b/time.c
@@ -1280,7 +1280,8 @@ init_leap_second_info()
else
known_leap_seconds_limit = now + (time_t)(366*86400);
- gmtime_with_leapsecond(&known_leap_seconds_limit, &result);
+ if (!gmtime_with_leapsecond(&known_leap_seconds_limit, &result))
+ return;
vtm.year = LONG2NUM(result.tm_year + 1900);
vtm.mon = result.tm_mon + 1;