Fix typo in x86_64-mont5.pl CFI directives
[openssl.git] / crypto / ec / ecdsa_ossl.c
index 6ff5a462d34563fe3dd2edfee474de2ad4fde829..d67c48524a78dbf570ed4c5b0e3c29ef28b14237 100644 (file)
@@ -221,6 +221,12 @@ ECDSA_SIG *ossl_ecdsa_sign_sig(const unsigned char *dgst, int dgst_len,
         ECerr(EC_F_OSSL_ECDSA_SIGN_SIG, ERR_R_MALLOC_FAILURE);
         return NULL;
     }
+    ret->r = BN_new();
+    ret->s = BN_new();
+    if (ret->r == NULL || ret->s == NULL) {
+        ECerr(EC_F_OSSL_ECDSA_SIGN_SIG, ERR_R_MALLOC_FAILURE);
+        goto err;
+    }
     s = ret->s;
 
     if ((ctx = BN_CTX_new()) == NULL ||