summaryrefslogtreecommitdiffstats
path: root/src/vnet/crypto/crypto.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/crypto/crypto.h')
-rw-r--r--src/vnet/crypto/crypto.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vnet/crypto/crypto.h b/src/vnet/crypto/crypto.h
index 9326a078f8a..626e71d5030 100644
--- a/src/vnet/crypto/crypto.h
+++ b/src/vnet/crypto/crypto.h
@@ -231,7 +231,8 @@ static_always_inline vnet_crypto_op_type_t
vnet_crypto_get_op_type (vnet_crypto_op_id_t id)
{
vnet_crypto_main_t *cm = &crypto_main;
- vnet_crypto_op_data_t *od = vec_elt_at_index (cm->opt_data, id);
+ ASSERT (id < VNET_CRYPTO_N_OP_IDS);
+ vnet_crypto_op_data_t *od = cm->opt_data + id;
return od->type;
}