VirtualBox

Changeset 97851 in vbox


Ignore:
Timestamp:
Dec 21, 2022 9:56:31 AM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
154937
Message:

FE/VBoxAutostart-win: Fix giving the dependencies as com::Bstr doesn't handle double null terminated strings and CreateServcieW() would scan pas the string end to find the double termination, ticketref:21349

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/manual/user_ChangeLogImpl.xml

    r97839 r97851  
    100100      </listitem>
    101101
     102      <listitem>
     103       <para>Windows Host: Fixed support for VM autostart (bug#21349)</para>
     104      </listitem>
     105
    102106    </itemizedlist>
    103107  </sect1>
  • trunk/src/VBox/Frontends/VBoxAutostart/VBoxAutostart-win.cpp

    r96407 r97851  
    775775            com::Bstr bstrUserFullName(sUserFullName);
    776776            com::Bstr bstrPwd(strPwd);
    777             com::Bstr bstrDependencies("Winmgmt\0RpcSs\0\0");
    778777
    779778            SC_HANDLE hSvc = CreateServiceW(hSCM,                            /* hSCManager */
     
    787786                                            NULL,                            /* lpLoadOrderGroup */
    788787                                            NULL,                            /* lpdwTagId */
    789                                             bstrDependencies.raw(),          /* lpDependencies */
     788                                            L"Winmgmt\0RpcSs\0\0",           /* lpDependencies */
    790789                                            bstrUserFullName.raw(),          /* lpServiceStartName (NULL => LocalSystem) */
    791790                                            bstrPwd.raw());                  /* lpPassword */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette