Files
linux/drivers/misc
Colin Ian King 080c697f79 altera-stapl: check for a null key before strcasecmp'ing it
[ Upstream commit 9ccb645683 ]

Currently the null check on key is occurring after the strcasecmp on
the key, hence there is a potential null pointer dereference on key.
Fix this by checking if key is null first. Also replace the == 0
check on strcasecmp with just the ! operator.

Detected by CoverityScan, CID#1248787 ("Dereference before null check")

Fixes: fa766c9be5 ("[media] Altera FPGA firmware download module")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-15 16:09:32 +09:00
..
2014-02-28 14:08:42 -08:00
2013-08-27 08:28:01 -07:00
2023-05-15 15:10:27 +09:00
2018-03-22 09:54:47 +01:00
2023-05-15 08:25:32 +09:00