]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ipmi:ssif: Handle a possible NULL pointer reference
authorCorey Minyard <cminyard@mvista.com>
Mon, 23 Dec 2019 16:42:19 +0000 (10:42 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Mar 2020 15:45:04 +0000 (16:45 +0100)
commit6e9200a41c00d2595941d79525f663d0651abef3
tree82dea33021dd73f83e2c0a1ff82a50a3c049c282
parenta8d2610a4413066faa15b3d47b6342eba4600b19
ipmi:ssif: Handle a possible NULL pointer reference

[ Upstream commit 6b8526d3abc02c08a2f888e8c20b7ac9e5776dfe ]

In error cases a NULL can be passed to memcpy.  The length will always
be zero, so it doesn't really matter, but go ahead and check for NULL,
anyway, to be more precise and avoid static analysis errors.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/char/ipmi/ipmi_ssif.c