VirtualBox

Ignore:
Timestamp:
Jul 11, 2016 3:31:57 PM (8 years ago)
Author:
vboxsync
Message:

Runtime: make sure the string passed to pfnOutput is zero terminated, as the code assumes it is the case (no serious failure if it isn't, but it triggers useless string duplication which is far more expensive than the zero termination)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/string/strformat.cpp

    r59703 r62164  
    560560                                RTUtf16GetCpEx(&pwszStr, &Cp);
    561561                                char *pszEnd = RTStrPutCp(szTmp, Cp);
     562                                *pszEnd = '\0';
    562563                                cch += pfnOutput(pvArgOutput, szTmp, pszEnd - szTmp);
    563564#else
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