projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
If we're going to return errors (no matter how stupid), then we should
[openssl.git]
/
crypto
/
hmac
/
hm_pmeth.c
diff --git
a/crypto/hmac/hm_pmeth.c
b/crypto/hmac/hm_pmeth.c
index aff7013b76d3ad0ec020a13db8eafc03ac5e8549..985921ca1ae20c7dda07cb52bc368916d954dd01 100644
(file)
--- a/
crypto/hmac/hm_pmeth.c
+++ b/
crypto/hmac/hm_pmeth.c
@@
-157,7
+157,11
@@
static int hmac_signctx(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
{
unsigned int hlen;
HMAC_PKEY_CTX *hctx = ctx->data;
{
unsigned int hlen;
HMAC_PKEY_CTX *hctx = ctx->data;
- *siglen = EVP_MD_CTX_size(mctx);
+ int l = EVP_MD_CTX_size(mctx);
+
+ if (l < 0)
+ return 0;
+ *siglen = l;
if (!sig)
return 1;
if (!sig)
return 1;