summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
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 17ba4aaf53..06bcd11382 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;