Commit 6b360288 authored by Phillip Hellewell's avatar Phillip Hellewell Committed by Rich Salz
Browse files

RT3053: Check for NULL before dereferencing



Reviewed-by: default avatarTim Hudson <tjh@openssl.org>
parent 6d6e8070
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -345,6 +345,8 @@ static STACK_OF(CMS_CertificateChoices)
        return &cms->d.signedData->certificates;

    case NID_pkcs7_enveloped:
        if (cms->d.envelopedData->originatorInfo == NULL)
            return NULL;
        return &cms->d.envelopedData->originatorInfo->certificates;

    default:
@@ -420,6 +422,8 @@ static STACK_OF(CMS_RevocationInfoChoice)
        return &cms->d.signedData->crls;

    case NID_pkcs7_enveloped:
        if (cms->d.envelopedData->originatorInfo == NULL)
            return NULL;
        return &cms->d.envelopedData->originatorInfo->crls;

    default: