diff options
author | ian.mcgreer%sun.com <devnull@localhost> | 2002-03-04 23:19:20 +0000 |
---|---|---|
committer | ian.mcgreer%sun.com <devnull@localhost> | 2002-03-04 23:19:20 +0000 |
commit | 9334b9cf5360c8669f40267bcf191171a23c182e (patch) | |
tree | e58cd7c901f502eb35965a7f42066dc7bd1ec51f | |
parent | 68da74b2af40ebf29de89b047c84c7d184c8d2f7 (diff) | |
download | nss-hg-9334b9cf5360c8669f40267bcf191171a23c182e.tar.gz |
bug 128915, prevent crash on empty S/MIME profiles
-rw-r--r-- | security/nss/lib/certdb/stanpcertdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/nss/lib/certdb/stanpcertdb.c b/security/nss/lib/certdb/stanpcertdb.c index cc1b46252..668ca85ea 100644 --- a/security/nss/lib/certdb/stanpcertdb.c +++ b/security/nss/lib/certdb/stanpcertdb.c @@ -714,7 +714,7 @@ CERT_SaveSMimeProfile(CERTCertificate *cert, SECItem *emailProfile, cc = c->object.cryptoContext; if (cc != NULL) { stanProfile = nssCryptoContext_FindSMIMEProfileForCertificate(cc, c); - if (stanProfile) { + if (stanProfile && stanProfile->profileData) { SECITEM_FROM_NSSITEM(&oldprof, stanProfile->profileData); oldProfile = &oldprof; } @@ -771,7 +771,7 @@ CERT_SaveSMimeProfile(CERTCertificate *cert, SECItem *emailProfile, */ NSSITEM_FROM_SECITEM(stanProfile->profileTime, profileTime); NSSITEM_FROM_SECITEM(stanProfile->profileData, emailProfile); - } else { + } else if (profileTime && emailProfile) { PRStatus nssrv; NSSDER subject; NSSItem profTime, profData; |