From 6f86850eec97884090ffa31d4cbc6eb9c9186eea Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Sun, 25 Jul 2004 19:25:05 +0000 Subject: [PATCH] Stricter boundary condition check in HMAC_Init_ex. --- crypto/hmac/hmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/hmac/hmac.c b/crypto/hmac/hmac.c index 50765e227b..b1aa05b2ea 100644 --- a/crypto/hmac/hmac.c +++ b/crypto/hmac/hmac.c @@ -89,7 +89,7 @@ void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, } else { - OPENSSL_assert(len <= (int)sizeof(ctx->key)); + OPENSSL_assert(len>0 && len <= (int)sizeof(ctx->key)); memcpy(ctx->key,key,len); ctx->key_length=len; } -- 2.25.1