summaryrefslogtreecommitdiffstats
path: root/src/vnet/crypto/crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/crypto/crypto.c')
-rw-r--r--src/vnet/crypto/crypto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/crypto/crypto.c b/src/vnet/crypto/crypto.c
index 4da8a14a14b..4a72b7cd116 100644
--- a/src/vnet/crypto/crypto.c
+++ b/src/vnet/crypto/crypto.c
@@ -134,7 +134,7 @@ vnet_crypto_is_set_handler (vnet_crypto_alg_t alg)
{
vnet_crypto_main_t *cm = &crypto_main;
- return (NULL != cm->ops_handlers[alg]);
+ return (alg < vec_len (cm->ops_handlers) && NULL != cm->ops_handlers[alg]);
}
void