2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-29 15:43:59 +08:00
linux-next/drivers/misc/altera-stapl
Colin Ian King 9ccb645683 altera-stapl: check for a null key before strcasecmp'ing it
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>
2018-11-27 08:44:07 +01:00
..
altera-comp.c
altera-exprt.h
altera-jtag.c
altera-jtag.h
altera-lpt.c
altera.c altera-stapl: check for a null key before strcasecmp'ing it 2018-11-27 08:44:07 +01:00
Kconfig misc: altera-stapl: drop Kconfig comment 2017-10-04 10:43:08 +02:00
Makefile