diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-07-19 19:57:15 +0200 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-07-20 15:02:54 +0200 |
commit | 8cc44d970ced1004db0727d7a7b3e2709c442e55 (patch) | |
tree | 02912af41ffa73021c9389112886b35026370f6e /crypto/dsa/dsa_ossl.c | |
parent | Install shared libraries in runtime install (diff) | |
download | openssl-8cc44d970ced1004db0727d7a7b3e2709c442e55.tar.xz openssl-8cc44d970ced1004db0727d7a7b3e2709c442e55.zip |
Don't allocate r/s in DSA_SIG and ECDSA_SIG
To avoid having to immediately free up r/s when setting them
don't allocate them automatically in DSA_SIG_new() and ECDSA_SIG_new().
RT#4590
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/dsa/dsa_ossl.c')
-rw-r--r-- | crypto/dsa/dsa_ossl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/dsa/dsa_ossl.c b/crypto/dsa/dsa_ossl.c index 8913fcccd3..f9f6a136fb 100644 --- a/crypto/dsa/dsa_ossl.c +++ b/crypto/dsa/dsa_ossl.c @@ -69,6 +69,10 @@ static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) ret = DSA_SIG_new(); if (ret == NULL) goto err; + ret->r = BN_new(); + ret->s = BN_new(); + if (ret->r == NULL || ret->s == NULL) + goto err; ctx = BN_CTX_new(); if (ctx == NULL) |