VirtualBox

Changeset 103275 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Feb 8, 2024 11:56:18 AM (12 months ago)
Author:
vboxsync
Message:

Backed out r161549 again (not wanted / bloat).

Location:
trunk/src/VBox/Runtime
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/dbg/dbgmod.cpp

    r103260 r103275  
    610610            if (pszName)
    611611            {
    612                 size_t const cchName       = strlen(pszName);
    613                 size_t const cchExtFileBuf = cchName + strlen(pszExt) + 1;
    614 
    615                 char *pszExtFileBuf = (char *)alloca(cchExtFileBuf);
    616                 AssertPtrReturn(pszExtFileBuf, VERR_NO_MEMORY);
    617 
    618                 memcpy(pszExtFileBuf, pszName, cchName + 1);
    619                 RTPathStripSuffix(pszExtFileBuf);
    620                 int rc2 = RTStrCat(pszExtFileBuf, cchExtFileBuf, pszExt);
    621                 AssertRCReturn(rc2, rc2);
    622 
    623                 pszExtFile = pszExtFileBuf;
     612                size_t cchName = strlen(pszName);
     613                char *pszExtFileBuf = (char *)alloca(cchName + strlen(pszExt) + 1);
     614                if (pszExtFileBuf)
     615                {
     616                    memcpy(pszExtFileBuf, pszName, cchName + 1);
     617                    RTPathStripSuffix(pszExtFileBuf);
     618                    pszExtFile = strcat(pszExtFileBuf, pszExt);
     619                }
    624620            }
    625621        }
  • trunk/src/VBox/Runtime/r3/xml.cpp

    r103260 r103275  
    23102310        if (RT_FAILURE(rc))
    23112311            throw EIPRTFailure(rc, "RTStrCopy");
    2312         rc = RTStrCat(szTmpFilename, sizeof(szTmpFilename), s_pszTmpSuff);
    2313         if (RT_FAILURE(rc))
    2314             throw EIPRTFailure(rc, "RTStrCat");
     2312        strcat(szTmpFilename, s_pszTmpSuff);
    23152313
    23162314        char szPrevFilename[RTPATH_MAX];
  • trunk/src/VBox/Runtime/testcase/tstRTR0CommonDriver.h

    r103260 r103275  
    121121        rc = RTPathAppend(szPath, RTPATH_MAX, pszTestServiceName);
    122122    if (RT_SUCCESS(rc))
    123         rc = RTStrCat(szPath, sizeof(szPath), ".r0");
     123        strcat(szPath, ".r0");
    124124    if (RT_FAILURE(rc))
    125125    {
     
    129129
    130130    char szSrvReqHandler[sizeof(g_szSrvName) + sizeof("SrvReqHandler")];
    131     rc = RTStrCopy(szSrvReqHandler, sizeof(szSrvReqHandler), pszTestServiceName);
    132     if (RT_SUCCESS(rc))
    133         rc = RTStrCat(szSrvReqHandler, sizeof(szSrvReqHandler), "SrvReqHandler");
    134     if (RT_FAILURE(rc))
    135     {
    136         RTTestFailed(g_hTest, "RTStrCat failed with rc=%Rrc\n", rc);
    137         return RTTestSummaryAndDestroy(g_hTest);
    138     }
    139 
     131    strcpy(szSrvReqHandler, pszTestServiceName);
     132    strcat(szSrvReqHandler, "SrvReqHandler");
    140133    for (size_t off = 0; RT_C_IS_LOWER(szSrvReqHandler[off]); off++)
    141134        szSrvReqHandler[off] = RT_C_TO_UPPER(szSrvReqHandler[off]);
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