Commit 63b2499b 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>
(cherry picked from commit 6b360288)
parent 5bbdc26c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -413,6 +413,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:
@@ -488,6 +490,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: