X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fec%2Fec_ameth.c;h=0ce4524076f138b9986432a901ee7fc4f8124cc5;hp=83909c185359a73046952b2ad9ac38991211b2e7;hb=94782e0e9c28bd872107b8f814f4db68c9fbf5ab;hpb=c3b344e36a088283731b4f65a70e85b100f55686 diff --git a/crypto/ec/ec_ameth.c b/crypto/ec/ec_ameth.c index 83909c1853..0ce4524076 100644 --- a/crypto/ec/ec_ameth.c +++ b/crypto/ec/ec_ameth.c @@ -88,7 +88,7 @@ static int eckey_param2type(int *pptype, void **ppval, EC_KEY *ec_key) if (!pstr) return 0; pstr->length = i2d_ECParameters(ec_key, &pstr->data); - if (pstr->length < 0) + if (pstr->length <= 0) { ASN1_STRING_free(pstr); ECerr(EC_F_ECKEY_PARAM2TYPE, ERR_R_EC_LIB);