VirtualBox

Ignore:
Timestamp:
Feb 8, 2024 11:56:18 AM (15 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
161567
Message:

Backed out r161549 again (not wanted / bloat).

File:
1 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        }
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