VirtualBox

Changeset 15109 in vbox


Ignore:
Timestamp:
Dec 8, 2008 1:55:37 PM (16 years ago)
Author:
vboxsync
Message:

Main/HardDisk2Impl: copy zero terminator too. Also deal correctly with NULL values on VM start in ConsoleImpl.

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

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

    r15053 r15109  
    853853                for (size_t i = 0; i < names.size(); ++ i)
    854854                {
    855                     rc = CFGMR3InsertString (pVDC, Utf8Str (names [i]),
    856                                              Utf8Str (values [i]));             RC_CHECK();
     855                    if (values [i])
     856                        rc = CFGMR3InsertString (pVDC, Utf8Str (names [i]),
     857                                                 Utf8Str (values [i]));             RC_CHECK();
    857858                }
    858859            }
  • trunk/src/VBox/Main/HardDisk2Impl.cpp

    r15051 r15109  
    31353135        return VERR_CFGM_VALUE_NOT_FOUND;
    31363136
    3137     memcpy (pszValue, value, value.length());
     3137    memcpy (pszValue, value, value.length() + 1);
    31383138
    31393139    return VINF_SUCCESS;
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