diff options
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/lib.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/rtc/lib.c b/drivers/rtc/lib.c index e36c233455ee..23284580df97 100644 --- a/drivers/rtc/lib.c +++ b/drivers/rtc/lib.c @@ -94,6 +94,7 @@ EXPORT_SYMBOL(rtc_time64_to_tm); int rtc_valid_tm(struct rtc_time *tm) { if (tm->tm_year < 70 || + tm->tm_year > (INT_MAX - 1900) || ((unsigned int)tm->tm_mon) >= 12 || tm->tm_mday < 1 || tm->tm_mday > rtc_month_days(tm->tm_mon, |