Don't dereference NULL pointers.

Submitted by: bowe@chip.ma.certco.com
This commit is contained in:
Bodo Möller 2000-07-02 18:16:38 +00:00
parent 69b5d3c51f
commit 186a6f4876

View File

@ -87,7 +87,7 @@ static STACK_OF(CONF_VALUE) *i2v_crld(X509V3_EXT_METHOD *method,
int i; int i;
for(i = 0; i < sk_DIST_POINT_num(crld); i++) { for(i = 0; i < sk_DIST_POINT_num(crld); i++) {
point = sk_DIST_POINT_value(crld, i); point = sk_DIST_POINT_value(crld, i);
if(point->distpoint->fullname) { if(point->distpoint && point->distpoint->fullname) {
exts = i2v_GENERAL_NAMES(NULL, exts = i2v_GENERAL_NAMES(NULL,
point->distpoint->fullname, exts); point->distpoint->fullname, exts);
} }
@ -95,7 +95,7 @@ static STACK_OF(CONF_VALUE) *i2v_crld(X509V3_EXT_METHOD *method,
X509V3_add_value("reasons","<UNSUPPORTED>", &exts); X509V3_add_value("reasons","<UNSUPPORTED>", &exts);
if(point->CRLissuer) if(point->CRLissuer)
X509V3_add_value("CRLissuer","<UNSUPPORTED>", &exts); X509V3_add_value("CRLissuer","<UNSUPPORTED>", &exts);
if(point->distpoint->relativename) if(point->distpoint && point->distpoint->relativename)
X509V3_add_value("RelativeName","<UNSUPPORTED>", &exts); X509V3_add_value("RelativeName","<UNSUPPORTED>", &exts);
} }
return exts; return exts;