summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--security/nss/lib/pki/pkibase.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/security/nss/lib/pki/pkibase.c b/security/nss/lib/pki/pkibase.c
index 9d62c7713..2c566048c 100644
--- a/security/nss/lib/pki/pkibase.c
+++ b/security/nss/lib/pki/pkibase.c
@@ -510,6 +510,11 @@ nssCertificateArray_FindBestCertificate (
* */
}
bestdc = nssCertificate_GetDecoding(bestCert);
+ if (!bestdc) {
+ nssCertificate_Destroy(bestCert);
+ bestCert = nssCertificate_AddRef(c);
+ continue;
+ }
/* time */
if (bestdc->isValidAtTime(bestdc, time)) {
/* The current best cert is valid at time */
@@ -1247,7 +1252,9 @@ NSSTime_SetPRTime (
{
NSSTime *rvTime;
rvTime = (timeOpt) ? timeOpt : nss_ZNEW(NULL, NSSTime);
- rvTime->prTime = prTime;
+ if (rvTime) {
+ rvTime->prTime = prTime;
+ }
return rvTime;
}