VirtualBox

Changeset 73312 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Jul 23, 2018 10:06:18 AM (6 years ago)
Author:
vboxsync
Message:

IPRT/crypto: Check content size in RTCrStoreCertAddFromFile() and RTCrStoreCertAddWantedFromFile().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/crypto/store-cert-add-basic.cpp

    r69753 r73312  
    55
    66/*
    7  * Copyright (C) 2006-2017 Oracle Corporation
     7 * Copyright (C) 2006-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    413413         * No assume PEM or DER encoded binary certificate.
    414414         */
    415         else
     415        else if (cbContent)
    416416        {
    417417            PCRTCRPEMSECTION pSectionHead;
     
    442442            }
    443443        }
     444        else /* Will happen if proxy not set / no connection available. */
     445            rc = RTErrInfoSetF(pErrInfo, VERR_EOF, "Certificate '%s' is empty", pszFilename);
    444446        RTFileReadAllFree(pvContent, cbContent);
    445447    }
     
    508510         * No assume PEM or DER encoded binary certificate.  Inspect them one by one.
    509511         */
    510         else
     512        else if (cbContent)
    511513        {
    512514            PCRTCRPEMSECTION pSectionHead;
     
    593595            }
    594596        }
     597        else /* Will happen if proxy not set / no connection available. */
     598            rc = RTErrInfoSetF(pErrInfo, VERR_EOF, "Certificate '%s' is empty", pszFilename);
    595599        RTFileReadAllFree(pvContent, cbContent);
    596600    }
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