Range check minutes under parse

This commit is contained in:
Howard Hinnant
2018-03-02 09:03:41 -05:00
parent ca4036a4b0
commit 43d8a4eab0
2 changed files with 56 additions and 1 deletions
+2 -1
View File
@@ -7006,7 +7006,8 @@ from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
goto broken;
}
fds.ymd = ymd;
fds.tod = time_of_day<Duration>(hours{h} + minutes{min});
fds.tod = time_of_day<Duration>{h};
fds.tod.m_ = min;
fds.tod.s_ = detail::decimal_format_seconds<Duration>{s};
if (wd != not_a_weekday)
fds.wd = weekday{static_cast<unsigned>(wd)};