VirtualBox

Changeset 30320 in vbox for trunk/src/VBox/VMM/DBGFMem.cpp


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/DBGFMem.cpp

    r28800 r30320  
    244244     * This may look a bit reckless with the rc but, it should be fine.
    245245     */
    246     if (!memchr(pszBuf, '\0', cchBuf))
     246    if (!RTStrEnd(pszBuf, cchBuf))
    247247    {
    248248        pszBuf[cchBuf - 1] = '\0';
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