projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
old_hmac_encode: check for NULL result when allocating *pder
[openssl.git]
/
crypto
/
hmac
/
hm_ameth.c
diff --git
a/crypto/hmac/hm_ameth.c
b/crypto/hmac/hm_ameth.c
index a6aa7931108c6d5ab4d222da1de53edb3782977c..3d998e94da861f0ea20a17a324d927614b10134d 100644
(file)
--- a/
crypto/hmac/hm_ameth.c
+++ b/
crypto/hmac/hm_ameth.c
@@
-123,6
+123,8
@@
static int old_hmac_encode(const EVP_PKEY *pkey, unsigned char **pder)
if (!*pder)
{
*pder = OPENSSL_malloc(os->length);
+ if (*pder == NULL)
+ return -1;
inc = 0;
}
else inc = 1;