VirtualBox

Changeset 30320 in vbox for trunk/src/VBox/VMM/VMMAll


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/VMM/VMMAll/VMAll.cpp

    r28800 r30320  
    242242    AssertPtr(pszErrorId);
    243243    Assert(*pszErrorId);
    244     Assert(memchr(pszErrorId, '\0', 128) != NULL);
     244    Assert(RTStrEnd(pszErrorId, 128) != NULL);
    245245    AssertPtr(pszFormat);
    246     Assert(memchr(pszFormat, '\0', 512) != NULL);
     246    Assert(RTStrEnd(pszFormat, 512) != NULL);
    247247
    248248#ifdef IN_RING3
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