security: fix verification of parameters
authorLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Thu, 9 Apr 2020 17:24:50 +0000 (19:24 +0200)
committerAkhil Goyal <akhil.goyal@nxp.com>
Sun, 19 Apr 2020 15:15:14 +0000 (17:15 +0200)
commitb6ee98547847e64b527484ab453a9f81ff3ce067
tree0ef0d90412e860601dbb1d4b0b81c151f8dda7cf
parent1fa538faeb962ec7f54a1cdf8cba5271de15e17d
security: fix verification of parameters

This patch adds verification of the parameters to the ret_security API
functions. All required parameters are checked if they are not NULL.

Checks verify full chain of pointers, e.g. in case of verification of
"instance->ops->session_XXX", they check also "instance"
and "instance->ops".

Fixes: c261d1431bd8 ("security: introduce security API and framework")
Fixes: 1a08c379b9b5 ("security: support user data retrieval")
Cc: stable@dpdk.org
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
lib/librte_security/rte_security.c