Files
linux-st/drivers/rtc
ZhangXiaoxu 074b01a51d rtc: Fix UBSAN overflow warning
Users may call 'ioctl' and pass a very big value on 'tm->tm_year'.
It can be overflowed in 'int' after add 1900.
In function 'rtc_month_days' and 'mktime64', also treated it as an
'unsigned' parameter.

UBSAN: Undefined behaviour in drivers/rtc/rtc-lib.c:103:59
signed integer overflow:
2147483647 + 1900 cannot be represented in type 'int'

UBSAN: Undefined behaviour in drivers/rtc/rtc-lib.c:119:30
signed integer overflow:
2147483647 + 1900 cannot be represented in type 'int'

So, covert it to 'unsigned' explicitly.

Signed-off-by: ZhangXiaoxu <zhangxiaoxu5@huawei.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-01-10 22:02:44 +01:00
..
2018-12-31 11:36:16 +01:00
2019-01-10 21:51:22 +01:00
2019-01-10 22:02:44 +01:00
2019-01-10 21:51:22 +01:00
2018-12-31 11:36:16 +01:00
2018-09-28 14:36:49 +02:00
2018-03-17 14:20:56 +01:00
2018-05-03 22:08:00 +02:00
2018-05-03 22:08:00 +02:00
2018-05-03 22:08:00 +02:00
2017-09-01 01:10:11 +02:00
2017-09-01 01:10:11 +02:00
2018-05-03 22:08:00 +02:00
2018-05-18 09:38:22 +02:00
2018-12-10 22:39:47 +01:00
2018-12-10 22:39:49 +01:00
2018-12-10 22:39:52 +01:00
2018-05-22 09:47:17 +02:00
2018-05-03 22:08:00 +02:00
2018-12-10 22:39:57 +01:00
2018-12-10 22:39:59 +01:00
2018-12-10 22:40:01 +01:00
2018-06-07 20:11:08 +02:00
2018-12-10 22:40:03 +01:00
2017-09-05 09:55:02 +02:00
2018-12-10 22:40:05 +01:00
2018-12-10 22:40:07 +01:00
2018-05-17 22:43:22 +02:00
2018-12-10 22:40:08 +01:00
2018-12-10 22:40:10 +01:00
2019-01-10 21:51:22 +01:00
2018-11-12 23:14:09 +01:00
2018-05-23 09:26:19 +02:00
2018-05-03 22:08:00 +02:00
2018-12-10 22:40:12 +01:00
2018-05-17 22:37:11 +02:00
2018-05-03 22:08:00 +02:00
2018-12-31 11:36:16 +01:00