summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjpierre%netscape.com <devnull@localhost>2002-09-26 01:37:41 +0000
committerjpierre%netscape.com <devnull@localhost>2002-09-26 01:37:41 +0000
commit2bc0d17c9b34b2297473d13ca7804b53afd10571 (patch)
tree7cc44b6e2d94ae624f60414a4777f035c82b92b2
parentfe264807583e44f30c5d62d18d86d83a19d6bd2d (diff)
downloadnss-hg-2bc0d17c9b34b2297473d13ca7804b53afd10571.tar.gz
Fix for 167615 - don't crash if the CRL isn't found due to a database error
-rw-r--r--security/nss/lib/softoken/pkcs11u.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/security/nss/lib/softoken/pkcs11u.c b/security/nss/lib/softoken/pkcs11u.c
index 2e4186276..bc2700aee 100644
--- a/security/nss/lib/softoken/pkcs11u.c
+++ b/security/nss/lib/softoken/pkcs11u.c
@@ -40,6 +40,7 @@
#include "pcert.h"
#include "secasn1.h"
#include "blapi.h"
+#include "secerr.h"
/*
* ******************** Attribute Utilities *******************************
@@ -989,9 +990,13 @@ pk11_FindCrlAttribute(PK11TokenObject *object, CK_ATTRIBUTE_TYPE type)
case CKA_VALUE:
break;
default:
- return NULL;
+ PORT_SetError(SEC_ERROR_INVALID_ARGS);
+ return NULL;
}
crl = pk11_getCrl(object);
+ if (!crl) {
+ return NULL;
+ }
switch (type) {
case CKA_NETSCAPE_URL:
if (crl->url == NULL) {