VirtualBox

Changeset 66608 in vbox


Ignore:
Timestamp:
Apr 19, 2017 10:35:06 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
114647
Message:

HostDrivers/Support: bugref:8740 Relax the path constraints

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp

    r66554 r66608  
    11881188
    11891189    /*
    1190      * Check each component.  No parent references or double slashes.
     1190     * The root slash should be alone to avoid UNC confusion.
     1191     */
     1192    if (RTPATH_IS_SLASH(pszSrc[0]))
     1193        return supR3HardenedSetError3(VERR_SUPLIB_PATH_NOT_CLEAN, pErrInfo,
     1194                                      "The path is not clean of leading double slashes: '", pszPath, "'");
     1195    /*
     1196     * Check each component.  No parent references.
    11911197     */
    11921198    pInfo->cComponents = 0;
     
    11951201    {
    11961202        /* Sanity checks. */
    1197         if (RTPATH_IS_SLASH(pszSrc[0])) /* can be relaxed if we care. */
    1198             return supR3HardenedSetError3(VERR_SUPLIB_PATH_NOT_CLEAN, pErrInfo,
    1199                                           "The path is not clean of double slashes: '", pszPath, "'");
    12001203        if (   pszSrc[0] == '.'
    12011204            && pszSrc[1] == '.'
     
    12271230                                              "The path is too long: '", pszPath, "'");
    12281231        }
     1232
     1233        /* Skip double slashes. */
     1234        while (RTPATH_IS_SLASH(*pszSrc))
     1235            pszSrc++;
    12291236    }
    12301237
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