]> git.baikalelectronics.ru Git - kernel.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:43:35 +0000 (16:43 +0100)
commitb47ca35cf5397e1f8803fa6252e76a5a131708f0
tree66a4ae8aba067983fde687ed02d1a67f334fe48f
parent1ba693464979224d37380d6c8143e490283d3c54
ipmi:ssif: Handle a possible NULL pointer reference

[ Upstream commit 3810faabc0e80568c1143ccf690531db591ca850 ]

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