X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_ameth.c;h=4a95de4b5a203b13c32406abb6df7814f2756493;hb=39baa02b5c60aaf62febbd9aa3e5cfa5a31908e6;hp=c31ef9a133ddd49d2c02843dfc51e0506a31ba76;hpb=4108e77e0eb091fdd9b9c4174374a6ac0cc0abd0;p=openssl-gost%2Fengine.git diff --git a/gost_ameth.c b/gost_ameth.c index c31ef9a..4a95de4 100644 --- a/gost_ameth.c +++ b/gost_ameth.c @@ -973,7 +973,7 @@ static int pub_encode_gost_ec(X509_PUBKEY *pub, const EVP_PKEY *pk) pval = params; order = BN_new(); - if (!order) { + if (order == NULL || EC_GROUP_get_order(EC_KEY_get0_group(ec), order, NULL) == 0) { GOSTerr(GOST_F_PUB_ENCODE_GOST_EC, ERR_R_MALLOC_FAILURE); goto err; }