VirtualBox

Changeset 82460 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 6, 2019 1:59:10 PM (5 years ago)
Author:
vboxsync
Message:

Shared Clipboard: No need to do RTPATH_MAX + 1.

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp

    r81829 r82460  
    14561456        if (pszPathAbs)
    14571457        {
    1458             char   szResolved[RTPATH_MAX + 1];
     1458            char   szResolved[RTPATH_MAX];
    14591459            size_t cbResolved = sizeof(szResolved);
    14601460            rc = RTPathAbsEx(pTransfer->pszPathRootAbs, pszPathAbs, RTPATH_STR_F_STYLE_HOST, szResolved, &cbResolved);
  • trunk/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardTransfers.cpp

    r81439 r82460  
    3030static int testCreateTempDir(RTTEST hTest, const char *pszTestcase, char *pszTempDir, size_t cbTempDir)
    3131{
    32     char szTempDir[RTPATH_MAX + 1];
     32    char szTempDir[RTPATH_MAX];
    3333    int rc = RTPathTemp(szTempDir, sizeof(szTempDir));
    3434    RTTESTI_CHECK_RC_RET(rc, VINF_SUCCESS, rc);
     
    5858static int testRemoveTempDir(RTTEST hTest)
    5959{
    60     char szTempDir[RTPATH_MAX + 1];
     60    char szTempDir[RTPATH_MAX];
    6161    int rc = RTPathTemp(szTempDir, sizeof(szTempDir));
    6262    RTTESTI_CHECK_RC_RET(rc, VINF_SUCCESS, rc);
     
    8888                          char **ppszFilePathAbs)
    8989{
    90     char szFilePath[RTPATH_MAX + 1];
     90    char szFilePath[RTPATH_MAX];
    9191
    9292    int rc = RTStrCopy(szFilePath, sizeof(szFilePath), pszTempDir);
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