VirtualBox

Ignore:
Timestamp:
Feb 6, 2013 2:04:14 PM (12 years ago)
Author:
vboxsync
Message:

Forward ported r83625 + r83626 (VBoxServiceVMInfo: Don't NULL LA client info, check for more pointers, VBoxServiceUtils: Pointer checks, don't leak property values if access is denied).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp

    r44528 r44570  
    307307    {
    308308        if (pClient->pszName)
     309        {
    309310            RTStrFree(pClient->pszName);
     311            pClient->pszName = NULL;
     312        }
    310313        if (pClient->pszLocation)
     314        {
    311315            RTStrFree(pClient->pszLocation);
     316            pClient->pszLocation = NULL;
     317        }
    312318        if (pClient->pszDomain)
     319        {
    313320            RTStrFree(pClient->pszDomain);
    314 
    315         pClient = NULL;
     321            pClient->pszDomain = NULL;
     322        }
    316323    }
    317324}
     
    753760    if (pszUserList)
    754761        RTStrFree(pszUserList);
     762
     763    VBoxServiceVerbose(4, "Writing users returned with rc=%Rrc\n", rc);
    755764    return rc;
    756765}
     
    11921201
    11931202        /* Check for new connection. */
    1194         char *pszLAClientID;
     1203        char *pszLAClientID = NULL;
    11951204        int rc2 = VBoxServiceReadHostProp(g_uVMInfoGuestPropSvcClientID, g_pszLAActiveClient, true /* Read only */,
    11961205                                          &pszLAClientID, NULL /* Flags */, NULL /* Timestamp */);
    11971206        if (RT_SUCCESS(rc2))
    11981207        {
     1208            AssertPtr(pszLAClientID);
    11991209            if (RTStrICmp(pszLAClientID, "0")) /* Is a client connected? */
    12001210            {
     
    12591269        }
    12601270
     1271        VBoxServiceVerbose(3, "VRDP: Handling location awareness done\n");
     1272
    12611273        /*
    12621274         * Flush all properties if we were restored.
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