VirtualBox

Changeset 75947 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Dec 4, 2018 1:17:55 PM (6 years ago)
Author:
vboxsync
Message:

VBoxService/Automounter: Corrected conversion to UTF-16 in vbsvcAutomounterMountIt.

File:
1 edited

Legend:

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

    r75946 r75947  
    13711371    AssertRC(rc);
    13721372
    1373     PRTUTF16 pwszName = &wszPrefixedName[RTUtf16Len(wszPrefixedName)];
    1374     rc = RTStrToUtf16Ex(pEntry->pszName, RTSTR_MAX, &pwszName, pwszName - wszPrefixedName, NULL);
     1373    size_t const offName = RTUtf16Len(wszPrefixedName);
     1374    PRTUTF16 pwszName = &wszPrefixedName[offName];
     1375    rc = RTStrToUtf16Ex(pEntry->pszName, RTSTR_MAX, &pwszName, sizeof(wszPrefixedName) - offName, NULL);
    13751376    if (RT_FAILURE(rc))
    13761377    {
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