VirtualBox

Changeset 81342 in vbox


Ignore:
Timestamp:
Oct 18, 2019 8:11:58 AM (5 years ago)
Author:
vboxsync
Message:

Shared Clipboard/Transfers: Some fixes for shClTransferResolvePathAbs(). Untested.

File:
1 edited

Legend:

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

    r81332 r81342  
    13851385
    13861386    /* Paranoia. */
    1387     if (   !strlen(pTransfer->pszPathRootAbs)
    1388         || !RTStrIsValidEncoding(pTransfer->pszPathRootAbs)
    1389         || !RTStrCmp(pTransfer->pszPathRootAbs, ".")
    1390         || !RTStrCmp(pTransfer->pszPathRootAbs, "..")
    1391         || !RTPathStartsWithRoot(pTransfer->pszPathRootAbs))
    1392     {
     1387    if (   !strlen(pszPath)
     1388        || !RTStrIsValidEncoding(pszPath)
     1389        ||  RTStrStr(pszPath, ".")
     1390        ||  RTStrStr(pszPath, ".."))
     1391    {
     1392        LogRel(("Shared Clipboard: Resolving absolute path '%s' failed, invalid\n", pszPath));
    13931393        return VERR_INVALID_PARAMETER;
    13941394    }
     
    23172317        pTransfer->pszPathRootAbs = pszPathRootAbs;
    23182318        LogFlowFunc(("pszPathRootAbs=%s, cRoots=%zu\n", pTransfer->pszPathRootAbs, pTransfer->cRoots));
    2319     }
     2319
     2320        LogRel2(("Shared Clipboard: Transfer uses root '%s'\n", pTransfer->pszPathRootAbs));
     2321    }
     2322    else
     2323        LogRel(("Shared Clipboard: Unable to set roots for transfer, rc=%Rrc\n", rc));
    23202324
    23212325    LogFlowFuncLeaveRC(rc);
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