VirtualBox

Ignore:
Timestamp:
Apr 9, 2019 1:23:41 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
129884
Message:

IPRT: Working on new RTPathAbsEx implementation, temporarily called RTPathAbsExEx. This should fix most of the bugs in the current RTPathAbs/Ex code and do away with the fixed path buffer limitations. Also introduces a RTPATH_BIG_MAX, given that RTPATH_MAX is just a reasonable and not absolute MAX value. The new one is more or less absolute and must never be used for stack buffers. [build fixes] bugref:9172

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/path/RTPathAbsExEx.cpp

    r78048 r78049  
    476476                else
    477477                {
    478                     int rc = RTPathParsedReassemble(pszPath, pParsed, fFlags & RTPATH_STR_F_STYLE_MASK, pszAbsPath, 0);
    479                     Assert(rc == VERR_BUFFER_OVERFLOW); RT_NOREF(rc);
     478                    rc = RTPathParsedReassemble(pszPath, pParsed, fFlags & RTPATH_STR_F_STYLE_MASK, pszAbsPath, 0);
     479                    Assert(rc == VERR_BUFFER_OVERFLOW);
    480480
    481481                    *pcbAbsPath = cchRootPrefix + pParsed->cchPath + 1;
     
    505505                else
    506506                {
    507                     int rc = RTPathParsedReassemble(pszPath, pParsed, fFlags & RTPATH_STR_F_STYLE_MASK, pszAbsPath, 0);
    508                     Assert(rc == VERR_BUFFER_OVERFLOW); RT_NOREF(rc);
     507                    rc = RTPathParsedReassemble(pszPath, pParsed, fFlags & RTPATH_STR_F_STYLE_MASK, pszAbsPath, 0);
     508                    Assert(rc == VERR_BUFFER_OVERFLOW);
    509509
    510510                    *pcbAbsPath = cchRootPrefix + pParsed->cchPath + 1;
     
    526526                if (rc == VERR_BUFFER_OVERFLOW)
    527527                {
    528                     int rc = RTPathParsedReassemble(pszPath, pParsed, fFlags & RTPATH_STR_F_STYLE_MASK, pszAbsPath, 0);
    529                     Assert(rc == VERR_BUFFER_OVERFLOW); RT_NOREF(rc);
     528                    int rc2 = RTPathParsedReassemble(pszPath, pParsed, fFlags & RTPATH_STR_F_STYLE_MASK, pszAbsPath, 0);
     529                    Assert(rc2 == VERR_BUFFER_OVERFLOW); RT_NOREF(rc2);
    530530
    531531                    char *pszTmp = (char *)RTMemTmpAlloc(RTPATH_BIG_MAX);
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