Don't crash if a pkcs #11 device gives us an invalid CRL (or even a valid CRL that we don't know how to parse).

This commit is contained in:
relyea%netscape.com 2002-07-10 01:31:01 +00:00
parent 04ee09cffc
commit a035ec8c53

View File

@ -852,6 +852,9 @@ pk11_CollectCrls(PK11SlotInfo *slot, CK_OBJECT_HANDLE crlID, void *arg)
derCrl.data = (unsigned char *)fetchCrl[0].pValue;
derCrl.len = fetchCrl[0].ulValueLen;
new_node->crl=CERT_DecodeDERCrl(head->arena,&derCrl,new_node->type);
if (new_node->crl == NULL) {
goto loser;
}
if (fetchCrl[2].pValue) {
int nnlen = fetchCrl[2].ulValueLen;