VirtualBox

Changeset 103311 in vbox for trunk/src/VBox/Main/src-all


Ignore:
Timestamp:
Feb 12, 2024 12:33:46 PM (14 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
161607
Message:

Fixed some (potential) va_args leaks (found by Parfait). ​bugref:3409

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-all/ExtPackManagerImpl.cpp

    r101293 r103311  
    27032703    apszArgs[cArgs++] = a_pszCommand;
    27042704
     2705    HRESULT hrc = S_OK;
     2706
    27052707    va_list va;
    27062708    va_start(va, a_pszCommand);
     
    27082710    for (;;)
    27092711    {
    2710         AssertReturn(cArgs < RT_ELEMENTS(apszArgs) - 1, E_UNEXPECTED);
     2712        AssertBreakStmt(cArgs < RT_ELEMENTS(apszArgs) - 1, hrc = E_UNEXPECTED);
    27112713        pszLastArg = va_arg(va, const char *);
    27122714        if (!pszLastArg)
     
    27162718    };
    27172719    va_end(va);
     2720    ComAssertComRCRet(hrc, hrc);
    27182721
    27192722    LogRel(("\n"));
     
    27332736     * Spawn the process.
    27342737     */
    2735     HRESULT hrc;
    27362738    RTPROCESS hProcess;
    27372739    vrc = RTProcCreateEx(szExecName,
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