diff options
author | jpierre%netscape.com <devnull@localhost> | 2002-09-26 01:38:45 +0000 |
---|---|---|
committer | jpierre%netscape.com <devnull@localhost> | 2002-09-26 01:38:45 +0000 |
commit | 396c37c2089bfcf44f33e4ea1a4e528a7b3a13e6 (patch) | |
tree | 12bbc9ec3bd70ab714e81bbf422fe0c9bdbf5254 | |
parent | 2bc0d17c9b34b2297473d13ca7804b53afd10571 (diff) | |
download | nss-hg-396c37c2089bfcf44f33e4ea1a4e528a7b3a13e6.tar.gz |
Fix for 167615 - don't crash if a token returns a NULL CRL object
-rw-r--r-- | security/nss/lib/pk11wrap/pk11cert.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/security/nss/lib/pk11wrap/pk11cert.c b/security/nss/lib/pk11wrap/pk11cert.c index ba4325ef9..b980bedda 100644 --- a/security/nss/lib/pk11wrap/pk11cert.c +++ b/security/nss/lib/pk11wrap/pk11cert.c @@ -851,8 +851,11 @@ pk11_CollectCrls(PK11SlotInfo *slot, CK_OBJECT_HANDLE crlID, void *arg) goto loser; } - new_node->type = *((CK_BBOOL *)fetchCrl[1].pValue) ? - SEC_KRL_TYPE : SEC_CRL_TYPE; + if (fetchCrl[1].pValue && *((CK_BBOOL *)fetchCrl[1].pValue)) + new_node->type = SEC_KRL_TYPE; + else + new_node->type = SEC_CRL_TYPE; + derCrl.type = 0; derCrl.data = (unsigned char *)fetchCrl[0].pValue; derCrl.len = fetchCrl[0].ulValueLen; |