Skip to content

Commit

Permalink
Fix a segfault when no arguments are provided
Browse files Browse the repository at this point in the history
Signed-off-by: Luke Robison <lrbison@amazon.com>
  • Loading branch information
lrbison committed Sep 14, 2024
1 parent e204c73 commit 29dd9c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/prte/prte.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ int main(int argc, char *argv[])
/* parse the input argv to get values, including everyone's MCA params */
PMIX_CONSTRUCT(&results, pmix_cli_result_t);
// check for special case of executable immediately following tool
if (proxyrun && '-' != pargv[1][0]) {
if (proxyrun && pargc > 1 && '-' != pargv[1][0]) {
results.tail = PMIx_Argv_copy(&pargv[1]);
} else {
rc = schizo->parse_cli(pargv, &results, PMIX_CLI_WARN);
Expand Down

0 comments on commit 29dd9c7

Please sign in to comment.