diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-11-24 12:34:10 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-27 08:44:07 +0100 |
commit | 9ccb645683ef46e3c52c12c088a368baa58447d4 (patch) | |
tree | 286d1dfc1f9762e2544caf151fb6af4ae3ce1842 /include/clocksource/timer-sp804.h | |
parent | 5323ac5177c445c15f49c91fadf9539a0bc95fa9 (diff) | |
download | linux-9ccb645683ef46e3c52c12c088a368baa58447d4.tar.gz linux-9ccb645683ef46e3c52c12c088a368baa58447d4.tar.bz2 linux-9ccb645683ef46e3c52c12c088a368baa58447d4.zip |
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: fa766c9be58b ("[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>
Diffstat (limited to 'include/clocksource/timer-sp804.h')
0 files changed, 0 insertions, 0 deletions