diff options
author | nelson%bolyard.com <devnull@localhost> | 2009-12-01 06:28:11 +0000 |
---|---|---|
committer | nelson%bolyard.com <devnull@localhost> | 2009-12-01 06:28:11 +0000 |
commit | 7a2af0bda16d42c862763552201afdd5822b05d1 (patch) | |
tree | 63e9dfde0d3b81ccd9685a60e59684c3b378937d /security/nss/lib/pk11wrap | |
parent | 12069e5348caa56fd2a4ebce31b152408a6ffecf (diff) | |
download | nss-hg-7a2af0bda16d42c862763552201afdd5822b05d1.tar.gz |
Bug 524167: Don't crash if slot has null token pointer after entering
FIPS mode. r=rrelyea
Diffstat (limited to 'security/nss/lib/pk11wrap')
-rw-r--r-- | security/nss/lib/pk11wrap/pk11cert.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/security/nss/lib/pk11wrap/pk11cert.c b/security/nss/lib/pk11wrap/pk11cert.c index 4aa094e7f..a51a604d9 100644 --- a/security/nss/lib/pk11wrap/pk11cert.c +++ b/security/nss/lib/pk11wrap/pk11cert.c @@ -854,6 +854,10 @@ PK11_ImportCert(PK11SlotInfo *slot, CERTCertificate *cert, nssCertificateStoreTrace unlockTrace = {NULL, NULL, PR_FALSE, PR_FALSE}; if (keyID == NULL) { + goto loser; /* error code should be set already */ + } + if (!token) { + PORT_SetError(SEC_ERROR_NO_TOKEN); goto loser; } |