cmd64x: potential buffer overflow in cmd64x_program_timings()

[ Upstream commit 117fcc3053 ]

The "drive->dn" value is a u8 and it is controlled by root only, but
it could be out of bounds here so let's check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Dan Carpenter 2020-01-07 16:04:41 +03:00 • committed by Greg Kroah-Hartman
commit fec984eeb4