aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-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 c465f14b7f9..6cd12108f6c 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