VirtualBox

Ignore:
Timestamp:
Oct 24, 2008 2:17:17 PM (16 years ago)
Author:
vboxsync
Message:

Guest Properties (Main, HostServices, VBoxGuestLib): MAX_*_LEN is the size in bytes, not the string length

File:
1 edited

Legend:

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

    r13551 r13556  
    35133513    Utf8Str Utf8Name = aName;
    35143514    AssertReturn(!Utf8Name.isNull(), E_OUTOFMEMORY);
    3515     char pszBuffer[MAX_VALUE_LEN + MAX_FLAGS_LEN + 2];
     3515    char pszBuffer[MAX_VALUE_LEN + MAX_FLAGS_LEN];
    35163516
    35173517    parm[0].type = VBOX_HGCM_SVC_PARM_PTR;
     
    45944594         pValue = CFGMR3GetNextValue (pValue))
    45954595    {
    4596         char szPropName[guestProp::MAX_NAME_LEN + 1];
     4596        char szPropName[guestProp::MAX_NAME_LEN];
    45974597        vrc = CFGMR3GetValueName (pValue, szPropName, sizeof(szPropName));
    45984598        if (RT_SUCCESS(vrc))
     
    46204620        using namespace guestProp;
    46214621
    4622         char szPropName [MAX_NAME_LEN + 1];
    4623         char szPropValue [MAX_VALUE_LEN + 1];
    4624         char szPropFlags [MAX_FLAGS_LEN + 1];
     4622        char szPropName [MAX_NAME_LEN];
     4623        char szPropValue [MAX_VALUE_LEN];
     4624        char szPropFlags [MAX_FLAGS_LEN];
    46254625        ULONG64 u64Timestamp = 0;  /* default */
    46264626        vrc = CFGMR3GetValueName (pValue, szPropName, sizeof (szPropName));
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