]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 7 Apr 2020 08:50:51 +0000 (10:50 +0200)
commitb5f2e7bb0842bff04ecdee6072ec89db49da8d49
tree09597a1936517f950bab567e6a3feb421dc520b8
parent65da14edb3431b1d436ed76fc854059b84c9308d
ipmi:ssif: Handle a possible NULL pointer reference

BugLink: https://bugs.launchpad.net/bugs/1868623
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/char/ipmi/ipmi_ssif.c