VirtualBox

Changeset 19928 in vbox for trunk/src/VBox/Runtime/r3


Ignore:
Timestamp:
May 22, 2009 11:47:35 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
47630
Message:

IPRT: More RTPathAppend docs updates.

File:
1 edited

Legend:

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

    r19926 r19928  
    729729
    730730
    731 RTDECL(int) RTPathAppend(char *pszPath, size_t cchPath, const char *pszAppend)
    732 {
    733     char *pszPathEnd = (char *)memchr(pszPath, '\0', cchPath);
     731RTDECL(int) RTPathAppend(char *pszPath, size_t cbPathDst, const char *pszAppend)
     732{
     733    char *pszPathEnd = (char *)memchr(pszPath, '\0', cbPathDst);
    734734    AssertReturn(pszPathEnd, VERR_INVALID_PARAMETER);
    735735
     
    744744    if (pszPathEnd == pszPath)
    745745    {
    746         if (cchAppend >= cchPath)
     746        if (cchAppend >= cbPathDst)
    747747            return VERR_BUFFER_OVERFLOW;
    748748        memcpy(pszPath, pszAppend, cchAppend + 1);
     
    762762                &&  RT_C_IS_ALPHA(pszPath[0]))
    763763            {
    764                 if ((size_t)(pszPathEnd - pszPath) + cchAppend >= cchPath)
     764                if ((size_t)(pszPathEnd - pszPath) + cchAppend >= cbPathDst)
    765765                    return VERR_BUFFER_OVERFLOW;
    766766            }
     
    768768#endif
    769769            {
    770                 if ((size_t)(pszPathEnd - pszPath) + 1 + cchAppend >= cchPath)
     770                if ((size_t)(pszPathEnd - pszPath) + 1 + cchAppend >= cbPathDst)
    771771                    return VERR_BUFFER_OVERFLOW;
    772772                *pszPathEnd++ = '/';
     
    779779                pszAppend++, cchAppend--;
    780780
    781             if ((size_t)(pszPathEnd - pszPath) + cchAppend >= cchPath)
     781            if ((size_t)(pszPathEnd - pszPath) + cchAppend >= cbPathDst)
    782782                return VERR_BUFFER_OVERFLOW;
    783783        }
     
    796796            pszPathEnd--;
    797797
    798         if ((size_t)(pszPathEnd - pszPath) + cchAppend >= cchPath)
     798        if ((size_t)(pszPathEnd - pszPath) + cchAppend >= cbPathDst)
    799799            return VERR_BUFFER_OVERFLOW;
    800800    }
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