diff --git a/security/nss/lib/smime/cmssiginfo.c b/security/nss/lib/smime/cmssiginfo.c index a008c323b84a..545a2c09829e 100644 --- a/security/nss/lib/smime/cmssiginfo.c +++ b/security/nss/lib/smime/cmssiginfo.c @@ -34,7 +34,7 @@ /* * CMS signerInfo methods. * - * $Id: cmssiginfo.c,v 1.20 2003/12/03 00:09:05 wchang0222%aol.com Exp $ + * $Id: cmssiginfo.c,v 1.21 2003/12/03 02:42:08 jpierre%netscape.com Exp $ */ #include "cmslocal.h" @@ -513,6 +513,12 @@ NSS_CMSSignerInfo_GetDigestAlgTag(NSSCMSSignerInfo *signerinfo) { SECOidData *algdata; + PORT_Assert(signerinfo); + if (!signerinfo) { + PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); + return SEC_OID_UNKNOWN; + } + algdata = SECOID_FindOID (&(signerinfo->digestAlg.algorithm)); if (algdata != NULL) return algdata->offset;