projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
787e992
)
pkey_gost_mac_keygen: check for NULL after allocating keydata
author
Jonas Maebe
<jonas.maebe@elis.ugent.be>
Sun, 8 Dec 2013 21:54:58 +0000
(22:54 +0100)
committer
Kurt Roeckx
<kurt@roeckx.be>
Thu, 4 Dec 2014 22:48:44 +0000
(23:48 +0100)
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
engines/ccgost/gost_pmeth.c
patch
|
blob
|
history
diff --git
a/engines/ccgost/gost_pmeth.c
b/engines/ccgost/gost_pmeth.c
index c8bf31c8e221c12310016ebc8d050994cf765dfa..7ccae8657e672a90f6fb03f44e6132a5d3a8ed66 100644
(file)
--- a/
engines/ccgost/gost_pmeth.c
+++ b/
engines/ccgost/gost_pmeth.c
@@
-562,6
+562,8
@@
static int pkey_gost_mac_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
return 0;
}
keydata = OPENSSL_malloc(32);
+ if (keydata == NULL)
+ return 0;
memcpy(keydata,data->key,32);
EVP_PKEY_assign(pkey, NID_id_Gost28147_89_MAC, keydata);
return 1;