summaryrefslogtreecommitdiff
path: root/drivers/media/Kconfig
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-02-10 17:26:46 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-03-12 11:46:45 +0300
commita7463e2dc698075132de9905b89f495df888bb79 (patch)
treedd753af56fb79a15c603667334ef9909c9776cbe /drivers/media/Kconfig
parent889968a4f76928ce08a607d576d6ffd7c3521925 (diff)
downloadlinux-a7463e2dc698075132de9905b89f495df888bb79.tar.xz
media: tda10071: fix unsigned sign extension overflow
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: 267897a4708f ("[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>
Diffstat (limited to 'drivers/media/Kconfig')
0 files changed, 0 insertions, 0 deletions