diff options
author | José Fonseca <jfonseca@vmware.com> | 2013-05-30 17:11:35 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2013-05-30 17:11:35 +0100 |
commit | c7d238675b2a3fd8d67bc2d8bc72b2ed0e07fec4 (patch) | |
tree | af32a2e6487b99dbdf605eefc0142e273b1ace98 /cli | |
parent | d39581fd05b7569b2acf278e1339d63e5cbf34ff (diff) |
cli: Prevent NULL pointer deref when trace verbose output is enabled.
Diffstat (limited to 'cli')
-rw-r--r-- | cli/cli_trace.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/cli_trace.cpp b/cli/cli_trace.cpp index f87a383b..8c7f5b12 100644 --- a/cli/cli_trace.cpp +++ b/cli/cli_trace.cpp @@ -169,7 +169,6 @@ traceProgram(trace::API api, for (char * const * arg = argv; *arg; ++arg) { args.push_back(*arg); } - args.push_back(NULL); if (verbose) { const char *sep = ""; @@ -180,6 +179,8 @@ traceProgram(trace::API api, std::cerr << "\n"; } + args.push_back(NULL); + status = os::execute((char * const *)&args[0]); exit: |