crypto/cnxk: prevent out-of-bound access in capabilities

In a situation where crypto_caps elements are checked only for
RTE_CRYPTO_OP_TYPE_UNDEFINED until valid op defined, there is
possibility for an out of bound access. Add this array by one
element for current capabilities.

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
This commit is contained in:
Gowrishankar Muthukrishnan 2022-04-21 13:28:19 +05:30 committed by Akhil Goyal
parent c662a1f97c
commit 59f8c378a1

View File

@ -10,7 +10,7 @@
#include "roc_cpt.h"
#define CNXK_CPT_MAX_CAPS 34
#define CNXK_CPT_MAX_CAPS 35
#define CNXK_SEC_CRYPTO_MAX_CAPS 12
#define CNXK_SEC_MAX_CAPS 9
#define CNXK_AE_EC_ID_MAX 8