Double free in i2o_ECPublicKey
[oweals/openssl.git] / crypto / ecdsa / ecs_sign.c
index 74b1fe8caff4d9816a3088dde7627113c1af742f..353d5af5146def603242fb1af0090c67fc714842 100644 (file)
@@ -57,6 +57,7 @@
 #ifndef OPENSSL_NO_ENGINE
 #include <openssl/engine.h>
 #endif
+#include <openssl/rand.h>
 
 ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dlen, EC_KEY *eckey)
 {
@@ -83,6 +84,7 @@ int ECDSA_sign_ex(int type, const unsigned char *dgst, int dlen, unsigned char
        EC_KEY *eckey)
 {
        ECDSA_SIG *s;
+       RAND_seed(dgst, dlen);
        s = ECDSA_do_sign_ex(dgst, dlen, kinv, r, eckey);
        if (s == NULL)
        {