diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-10-06 21:01:42 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-10-09 15:05:48 +0300 |
commit | 32ae592036d7aeaabcccb2b1715373a68639a768 (patch) | |
tree | 70b554b39b6513d6324e2301cdb910e244ecda25 /drivers/scsi/scsi_pm.c | |
parent | d07d9195c950d1cd16ec32a0819b2b98084c0753 (diff) | |
download | linux-32ae592036d7aeaabcccb2b1715373a68639a768.tar.xz |
media: cx231xx: fix potential sign-extension overflow on large shift
Shifting the u8 value[3] by an int can lead to sign-extension
overflow. For example, if value[3] is 0xff and the shift is 24 then it
is promoted to int and then the top bit is sign-extended so that all
upper 32 bits are set. Fix this by casting value[3] to a u32 before
the shift.
Detected by CoverityScan, CID#1016522 ("Unintended sign extension")
Fixes: e0d3bafd0258 ("V4L/DVB (10954): Add cx231xx USB driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/scsi/scsi_pm.c')
0 files changed, 0 insertions, 0 deletions