VirtualBox

Changeset 18371 in vbox for trunk/src


Ignore:
Timestamp:
Mar 27, 2009 5:05:52 AM (16 years ago)
Author:
vboxsync
Message:

RTAssertShouldPanic-vbox.cpp: don't waste stack.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/VBox/RTAssertShouldPanic-vbox.cpp

    r18174 r18371  
    5353# include <iprt/thread.h>
    5454# include <iprt/asm.h>
    55 # include <iprt/param.h>
    5655#endif
    5756
     
    110109
    111110        /* Try spawn the process. */
    112         char szCmd[512];
    113         char szExecName[RTPATH_MAX];
    114         if (!RTProcGetExecutableName((szExecName), sizeof(szExecName)))
    115             strcpy(szExecName, "");
    116         RTStrPrintf(szCmd, sizeof(szCmd), "%s -p %d %s", pszGdb, RTProcSelf(), szExecName);
     111        char    szCmd[512];
     112        size_t  cch = RTStrPrintf(szCmd, sizeof(szCmd), "%s -p %d ", pszGdb, RTProcSelf());
     113        if (cch < sizeof(szCmd))
     114        {
     115            char *pszExecName = &szCmd[cch];
     116            if (!RTProcGetExecutableName(pszExecName, sizeof(szCmd) - cch))
     117                *pszExecName = '\0';
     118        }
    117119        const char *apszArgs[] =
    118120        {
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