VirtualBox

Ignore:
Timestamp:
Jul 22, 2008 1:50:54 PM (16 years ago)
Author:
vboxsync
Message:

HostServices/GuestProperties, Main, Additions/common, VBox/VBoxGuest.h: guest properties fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r10797 r10814  
    35613561    VBOXHGCMSVCPARM parm[3];
    35623562    Utf8Str Utf8Key = aKey;
    3563     Utf8Str Utf8Value (MAX_VALUE_LEN);
     3563    Utf8Str Utf8Value (MAX_VALUE_LEN + 1);
    35643564
    35653565    parm[0].type = VBOX_HGCM_SVC_PARM_PTR;
     
    35703570    parm[1].type = VBOX_HGCM_SVC_PARM_PTR;
    35713571    parm[1].u.pointer.addr = Utf8Value.mutableRaw();
    3572     parm[1].u.pointer.size = MAX_VALUE_LEN;
     3572    parm[1].u.pointer.size = MAX_VALUE_LEN + 1;
    35733573    int vrc = mVMMDev->hgcmHostCall ("VBoxGuestPropSvc", GET_CONFIG_KEY_HOST,
    35743574                                     3, &parm[0]);
     
    41804180    {
    41814181        using namespace guestProp;
    4182         char szKeyName[MAX_NAME_LEN];
    4183         char szKeyValue[MAX_VALUE_LEN];
    4184         char szExtraDataName[VBOX_SHARED_INFO_PREFIX_LEN + MAX_NAME_LEN];
    4185         vrc = CFGMR3GetValueName (pValue, szKeyName, MAX_NAME_LEN);
     4182        char szKeyName[MAX_NAME_LEN + 1];
     4183        char szKeyValue[MAX_VALUE_LEN + 1];
     4184        char szExtraDataName[VBOX_SHARED_INFO_PREFIX_LEN + MAX_NAME_LEN + 1];
     4185        vrc = CFGMR3GetValueName (pValue, szKeyName, sizeof(szKeyName));
    41864186        if (RT_SUCCESS(vrc))
    41874187            vrc = CFGMR3QueryString (pRegistry, szKeyName, szKeyValue, sizeof(szKeyValue));
     
    42244224
    42254225        /* Now see if a lookup of the name in the CFGM node succeeds. */
    4226         char szKeyValue[MAX_VALUE_LEN];
     4226        char szKeyValue[MAX_VALUE_LEN + 1];
    42274227        vrc = CFGMR3QueryString (pRegistry, pszCFGMValueName, szKeyValue, sizeof(szKeyValue));
    42284228        /* And delete it from the extra data if it failed. */
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