VirtualBox

Changeset 46633 in vbox


Ignore:
Timestamp:
Jun 18, 2013 4:59:34 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
86517
Message:

RTMpGetDescription: Strip the string before returning it (avoid lots of leading spaces on intel).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/generic/RTMpGetDescription-generic.cpp

    r44529 r46633  
    100100     * Copy it out into the buffer supplied by the caller.
    101101     */
    102     size_t  cch = strlen(szString);
    103     if (cch >= cbBuf)
     102    char   *pszSrc = RTStrStrip(szString);
     103    size_t  cchSrc = strlen(pszSrc);
     104    if (cchSrc >= cbBuf)
    104105        return VERR_BUFFER_OVERFLOW;
    105     memcpy(pszBuf, szString, cch + 1);
     106    memcpy(pszBuf, pszSrc, cchSrc + 1);
    106107    return VINF_SUCCESS;
    107108}
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