summaryrefslogtreecommitdiffstats
path: root/crypto/hmac
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2004-07-25 19:25:05 +0000
committerAndy Polyakov <appro@openssl.org>2004-07-25 19:25:05 +0000
commit6f86850eec97884090ffa31d4cbc6eb9c9186eea (patch)
treefc4a42fa387296e309de6c19636c99a880ccb613 /crypto/hmac
parent16ab8a93bc96cacc1b5376cc084f70122368ee1f (diff)
Stricter boundary condition check in HMAC_Init_ex.
Diffstat (limited to 'crypto/hmac')
-rw-r--r--crypto/hmac/hmac.c2
1 files changed, 1 insertions, 1 deletions
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;
}