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/HostDrivers/VBoxNetAdp/darwin/VBoxNetAdp-darwin.cpp

    r28800 r30320  
    365365        case IOCBASECMD(VBOXNETADP_CTL_REMOVE):
    366366        {
    367             if (!memchr(pReq->szName, '\0', RT_MIN(cbReq, sizeof(pReq->szName))))
     367            if (!RTStrEnd(pReq->szName, RT_MIN(cbReq, sizeof(pReq->szName))))
    368368                return EINVAL;
    369369
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