Files
linux/drivers/media/dvb-frontends
Colin Ian King c137efe650 media: tda10071: fix unsigned sign extension overflow
[ Upstream commit a7463e2dc6 ]

The shifting of buf[3] by 24 bits to the left will be promoted to
a 32 bit signed int and then sign-extended to an unsigned long. In
the unlikely event that the the top bit of buf[3] is set then all
then all the upper bits end up as also being set because of
the sign-extension and this affect the ev->post_bit_error sum.
Fix this by using the temporary u32 variable bit_error to avoid
the sign-extension promotion. This also removes the need to do the
computation twice.

Addresses-Coverity: ("Unintended sign extension")

Fixes: 267897a470 ("[media] tda10071: implement DVBv5 statistics")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-16 09:15:50 +09:00
..
2015-08-11 07:10:04 -03:00
2016-07-12 13:32:39 -03:00
2016-01-25 12:01:08 -02:00
2016-01-25 12:01:08 -02:00
2016-01-25 12:01:08 -02:00
2016-01-25 12:01:08 -02:00
2013-04-22 16:58:16 -03:00
2016-11-13 10:02:22 -08:00
2016-11-13 10:02:22 -08:00
2016-11-13 10:02:22 -08:00
2017-01-09 08:32:23 +01:00
2016-06-07 15:41:58 -03:00
2017-01-09 08:32:23 +01:00
2016-03-03 09:26:05 -03:00
2015-04-08 15:02:07 -03:00
2015-04-08 15:02:07 -03:00
2016-09-22 12:56:35 -03:00
2016-09-22 12:55:49 -03:00
2016-02-09 08:56:42 -02:00
2023-05-15 13:59:59 +09:00