|
|
@@ -1097,6 +1097,8 @@ static char *set_schedtime(const char *arg, struct schedtime *st)
|
|
|
{
|
|
|
if (sscanf(arg, "%d:%d", &st->tm.tm_hour, &st->tm.tm_min) != 2)
|
|
|
return "Invalid time set, should be HH:MM";
|
|
|
+ if (st->tm.tm_hour > 23 || st->tm.tm_min > 59 || st->tm.tm_hour < 0 || st->tm.tm_min < 0)
|
|
|
+ return "Invalid time set.";
|
|
|
st->enable = true;
|
|
|
return NULL;
|
|
|
}
|