linux-uconsole/drivers/misc
Colin Ian King f6ea3c03ec 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>
2019-12-13 08:51:56 +01:00
..
altera-stapl altera-stapl: check for a null key before strcasecmp'ing it 2019-12-13 08:51:56 +01:00
c2port
cardreader
cb710
cxl misc: cxl: Fix possible null pointer dereference 2019-11-24 08:21:03 +01:00
echo
eeprom eeprom: at24: make spd world-readable again 2019-08-06 19:06:57 +02:00
genwqe misc: genwqe: should return proper error value. 2019-11-20 18:47:31 +01:00
ibmasm
lis3lv02d
lkdtm lkdtm: support llvm-objcopy 2019-07-14 08:11:21 +02:00
mei mei: me: add comet point V device id 2019-12-05 09:21:27 +01:00
mic misc: mic: fix a DMA pool free failure 2019-12-01 09:16:22 +01:00
ocxl
sgi-gru
sgi-xp
ti-st
vmw_vmci VMCI: Release resource if the work is already queued 2019-09-06 10:22:20 +02:00
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c
apds9802als.c
aspeed-lpc-ctrl.c
aspeed-lpc-snoop.c
atmel-ssc.c
atmel_tclib.c
bh1770glc.c
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
enclosure.c
fsa9480.c
hmc6352.c
hpilo.c
hpilo.h
ibmvmc.c misc: ibmvsm: Fix potential NULL pointer dereference 2019-01-31 08:14:35 +01:00
ibmvmc.h
ics932s401.c
ioc4.c
isl29003.c
isl29020.c
Kconfig
kgdbts.c misc: kgdbts: Fix restrict error 2019-11-20 18:47:31 +01:00
lattice-ecp3-config.c
Makefile
pch_phub.c
pci_endpoint_test.c misc: pci_endpoint_test: Fix test_reg_bar to be updated in pci_endpoint_test 2019-06-15 11:54:06 +02:00
phantom.c
pti.c
qcom-coincell.c
spear13xx_pcie_gadget.c
sram-exec.c
sram.c
sram.h
tifm_7xx1.c
tifm_core.c
tsl2550.c
vexpress-syscfg.c misc: vexpress: Off by one in vexpress_syscfg_exec() 2019-02-15 08:10:11 +01:00
vmw_balloon.c