ipsec: check SAD lookup error
authorVladimir Medvedkin <vladimir.medvedkin@intel.com>
Mon, 11 May 2020 09:23:06 +0000 (10:23 +0100)
committerAkhil Goyal <akhil.goyal@nxp.com>
Mon, 11 May 2020 11:17:43 +0000 (13:17 +0200)
commite62893f5ec27a361e74b3961edb808fb3d420bb1
tree0be428ce1beda4dc303044f27339f0ba15a7a533
parent04fa1906fce99078695e08c8b71a132ebe6af4fd
ipsec: check SAD lookup error

Explicitly check return value in add_specific()
CID 357760 (#2 of 2): Negative array index write (NEGATIVE_RETURNS)
8. negative_returns: Using variable ret as an index to array sad->cnt_arr

Coverity issue: 357760
Fixes: b2ee26926775 ("ipsec: add SAD add/delete/lookup implementation")
Cc: stable@dpdk.org
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
lib/librte_ipsec/ipsec_sad.c