summaryrefslogtreecommitdiffstats
path: root/crypto/cmac
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/cmac')
-rw-r--r--crypto/cmac/cmac.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/cmac/cmac.c b/crypto/cmac/cmac.c
index b1be991f87..ec12970cb2 100644
--- a/crypto/cmac/cmac.c
+++ b/crypto/cmac/cmac.c
@@ -199,7 +199,8 @@ int CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen)
return 0;
if ((bl = EVP_CIPHER_CTX_block_size(ctx->cctx)) < 0)
return 0;
- *poutlen = (size_t)bl;
+ if (poutlen != NULL)
+ *poutlen = (size_t)bl;
if (!out)
return 1;
lb = ctx->nlast_block;