VirtualBox

Ignore:
Timestamp:
Dec 1, 2021 2:08:08 AM (3 years ago)
Author:
vboxsync
Message:

VBoxService: Made vgsvcGstCtrlProcessMakeFullPath do the same thing everywhere, as the ExpandEnvironmentStrings call is the wrong approach here (see ancient @todo) and works on ANSI strings where as our strings are UTF-8 and this would prevent executables with non-ASCII characters in them from running. bugref:10153

File:
1 edited

Legend:

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

    r92658 r92659  
    974974static int vgsvcGstCtrlProcessMakeFullPath(const char *pszPath, char *pszExpanded, size_t cbExpanded)
    975975{
    976     int rc = VINF_SUCCESS;
    977976/** @todo r=bird: This feature shall be made optional, i.e. require a
    978977 *        flag to be passed down.  Further, it shall work on the environment
     
    983982 *        Since this currently not available on non-windows guests, I suggest
    984983 *        we disable it until such a time as it is implemented correctly. */
    985 #ifdef RT_OS_WINDOWS
     984#if 0 /*def RT_OS_WINDOWS - see above. Don't know why this wasn't disabled before 7.0, didn't see the @todo yet? */
     985    int rc = VINF_SUCCESS;
    986986    if (!ExpandEnvironmentStrings(pszPath, pszExpanded, (DWORD)cbExpanded))
    987987        rc = RTErrConvertFromWin32(GetLastError());
    988988#else
    989     /* No expansion for non-Windows yet. */
    990     rc = RTStrCopy(pszExpanded, cbExpanded, pszPath);
     989    /* There is no expansion anywhere yet, see above @todo. */
     990    int rc = RTStrCopy(pszExpanded, cbExpanded, pszPath);
    991991#endif
    992992#ifdef DEBUG
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