1diff --git a/crypto/ec/ec_asn1.c b/crypto/ec/ec_asn1.c 2index 7b7c75ce84..e497a25909 100644 3--- a/crypto/ec/ec_asn1.c 4+++ b/crypto/ec/ec_asn1.c 5@@ -761,7 +761,10 @@ EC_GROUP *EC_GROUP_new_from_ecparameters(const ECPARAMETERS *params) 6 ret->seed_len = params->curve->seed->length; 7 } 8 9- if (!params->order || !params->base || !params->base->data) { 10+ if (params->order == NULL 11+ || params->base == NULL 12+ || params->base->data == NULL 13+ || params->base->length == 0) { 14 ECerr(EC_F_EC_GROUP_NEW_FROM_ECPARAMETERS, EC_R_ASN1_ERROR); 15 goto err; 16 } 17 18