VirtualBox

Ignore:
Timestamp:
Jun 21, 2010 8:35:09 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
62878
Message:

*: Replaced memchr(psz, '\0', cb) with RTStrEnd(psz, cb) and worked around memchr( RTSTR_MAX) issue in RTStrEnd. Here (linux.amd64 / glibc-2.10.1-r1) memchr fails for cb > ~(size_t)11. Since RTSTR_MAX is ~(size_t)0, this behavior breaks several IPRT string APIs.

File:
1 edited

Legend:

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

    r28800 r30320  
    107107RTDECL(int) RTPathAppend(char *pszPath, size_t cbPathDst, const char *pszAppend)
    108108{
    109     char *pszPathEnd = (char *)memchr(pszPath, '\0', cbPathDst);
     109    char *pszPathEnd = RTStrEnd(pszPath, cbPathDst);
    110110    AssertReturn(pszPathEnd, VERR_INVALID_PARAMETER);
    111111
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