summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilia Kasper <emilia@openssl.org>2015-04-14 17:42:42 +0200
committerEmilia Kasper <emilia@openssl.org>2015-04-21 19:32:43 +0200
commita209623fbb5b5cdaaf3a825442cb1ed86a985df6 (patch)
tree6a10e5ee0f8b430fa4b993492836b1fa0a9d5b99
parent92caee08d30b05d5692a304368cf53f17e8dd7a9 (diff)
Initialize variable
newsig may be used (freed) uninitialized on a malloc error. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 68249414405500660578b337f1c8dd5dd4bb5bcc)
-rw-r--r--engines/ccgost/gost_sign.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/ccgost/gost_sign.c b/engines/ccgost/gost_sign.c
index 4b5f49efea..07ad921ab5 100644
--- a/engines/ccgost/gost_sign.c
+++ b/engines/ccgost/gost_sign.c
@@ -53,7 +53,7 @@ void dump_dsa_sig(const char *message, DSA_SIG *sig)
DSA_SIG *gost_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
{
BIGNUM *k = NULL, *tmp = NULL, *tmp2 = NULL;
- DSA_SIG *newsig, *ret = NULL;
+ DSA_SIG *newsig = NULL, *ret = NULL;
BIGNUM *md = hashsum2bn(dgst);
/* check if H(M) mod q is zero */
BN_CTX *ctx = BN_CTX_new();