diff options
Diffstat (limited to 'drivers/rtc/rtc-lib.c')
-rw-r--r-- | drivers/rtc/rtc-lib.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-lib.c b/drivers/rtc/rtc-lib.c index 1b23458a57..83d80455da 100644 --- a/drivers/rtc/rtc-lib.c +++ b/drivers/rtc/rtc-lib.c @@ -90,6 +90,8 @@ int rtc_valid_tm(struct rtc_time *tm) { if (tm->tm_year < 70 || ((unsigned)tm->tm_mon) >= 12 + || tm->tm_wday < 0 + || tm->tm_wday > 6 || tm->tm_mday < 1 || tm->tm_mday > rtc_month_days(tm->tm_mon, tm->tm_year + 1900) || ((unsigned)tm->tm_hour) >= 24 |