VirtualBox

Ignore:
Timestamp:
Oct 17, 2016 10:38:53 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
111315
Message:

VBoxTray,InstallerHelper,VBoxService: Use RTLOCALIPC_FLAGS_NATIVE_NAME and format the pipe name into buffers of the exact same size.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxIPC.cpp

    r64291 r64292  
    196196    {
    197197        char szPipeName[512 + sizeof(VBOXTRAY_IPC_PIPE_PREFIX)];
    198         strcpy(szPipeName, VBOXTRAY_IPC_PIPE_PREFIX);
     198        memcpy(szPipeName, VBOXTRAY_IPC_PIPE_PREFIX, sizeof(VBOXTRAY_IPC_PIPE_PREFIX));
    199199        rc = RTProcQueryUsername(NIL_RTPROCESS,
    200200                                 &szPipeName[sizeof(VBOXTRAY_IPC_PIPE_PREFIX) - 1],
     
    203203        if (RT_SUCCESS(rc))
    204204        {
    205             rc = RTLocalIpcServerCreate(&pCtx->hServer, szPipeName, 0 /*fFlags*/);
     205            rc = RTLocalIpcServerCreate(&pCtx->hServer, szPipeName, RTLOCALIPC_FLAGS_NATIVE_NAME);
    206206            if (RT_SUCCESS(rc))
    207207            {
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