summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authorglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-21 16:58:47 (GMT)
committerglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-21 16:58:47 (GMT)
commit5697b2f013a6b0d13bcefef055c7349a526f2615 (patch)
tree803b33de7d7c4ebd3341dda2cedb643d9dd0abf8 /time.c
parenta3307d5e5aff2865a2d25dac2e211654efc2e2e0 (diff)
* time.c: raise exception when minutes of utc_offset is out of 00-59.
patch is from Kenichi Kamiya. [ruby-dev:47539] [Bug #8679] * test/ruby/test_time.rb: test for above. patch is from Kenichi Kamiya. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/time.c b/time.c
index 17ba4aa..06bcd11 100644
--- a/time.c
+++ b/time.c
@@ -2092,6 +2092,7 @@ utc_offset_arg(VALUE arg)
if (!ISDIGIT(s[1]) || !ISDIGIT(s[2])) goto invalid_utc_offset;
if (s[3] != ':') goto invalid_utc_offset;
if (!ISDIGIT(s[4]) || !ISDIGIT(s[5])) goto invalid_utc_offset;
+ if (s[4] > '5') goto invalid_utc_offset;
break;
default:
goto invalid_utc_offset;