VirtualBox

Ignore:
Timestamp:
Nov 8, 2022 9:46:10 PM (2 years ago)
Author:
vboxsync
Message:

IPRT/crypto: Corrected and unified the error checking of d2i_TYPE calls and corrected a i2d_TYPE one. Kudos to fth0 for finding these. ticketref:21097

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/crypto/iprt-openssl.cpp

    r96407 r97465  
    111111        X509 *pOsslCertRet = d2i_X509(&pOsslCert, &pabEncoded, cbEncoded);
    112112        RTMemTmpFree(pvFree);
    113         if (pOsslCertRet == pOsslCert)
     113        if (pOsslCert != NULL && pOsslCertRet == pOsslCert)
    114114        {
    115115            *ppvOsslCert = pOsslCert;
     
    181181        X509_ATTRIBUTE *pOsslAttribRet = d2i_X509_ATTRIBUTE(&pOsslAttrib, &pabEncoded, cbEncoded);
    182182        RTMemTmpFree(pvFree);
    183         if (pOsslAttribRet == pOsslAttrib)
     183        if (pOsslAttrib != NULL && pOsslAttribRet == pOsslAttrib)
    184184        {
    185185            *ppvOsslAttrib = pOsslAttrib;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette