VirtualBox

Changeset 83716 in vbox for trunk/src/VBox/Additions/darwin


Ignore:
Timestamp:
Apr 16, 2020 1:18:42 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
137226
Message:

darwin/VBoxClient: VBoxClient.cpp:usage() SEGVs dereferencing an uninitialized thread due to calling RTPrintf() before RTR3InitExe()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/darwin/VBoxClient/VBoxClient.cpp

    r82968 r83716  
    200200{
    201201    RTPrintf("usage: %s [-fvl]\n", sProgName);
    202     RTPrintf("       -f\tRun in foreground (default: no)\n", sProgName);
    203     RTPrintf("       -v\tIncrease verbosity level (default: no verbosity)\n", sProgName);
    204     RTPrintf("       -l\tSpecify log file name (default: no log file)\n", sProgName);
     202    RTPrintf("       -f\tRun in foreground (default: no)\n");
     203    RTPrintf("       -v\tIncrease verbosity level (default: no verbosity)\n");
     204    RTPrintf("       -l\tSpecify log file name (default: no log file)\n");
    205205    exit(1);
    206206}
     
    213213    bool         fDemonize     = true;
    214214    static char *szLogFileName = NULL;
     215
     216    rc = RTR3InitExe(argc, &argv, 0);
     217    if (RT_FAILURE(rc))
     218    {
     219        RTPrintf("RTR3InitExe() failed: (%Rrc)\n", rc);
     220        return RTMsgInitFailure(rc);
     221    }
    215222
    216223    /* Parse command line */
     
    245252            return 1;
    246253        }
    247     }
    248 
    249     rc = RTR3InitExe(argc, &argv, 0);
    250     if (RT_FAILURE(rc))
    251     {
    252         RTPrintf("RTR3InitExe() failed: (%Rrc)\n", rc);
    253         return RTMsgInitFailure(rc);
    254254    }
    255255
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