Skip to content

Commit

Permalink
Merge pull request #18 from lrbison/fix_no_args_segfault
Browse files Browse the repository at this point in the history
Fix a segfault when no arguments are provided
  • Loading branch information
hppritcha authored Sep 26, 2024
2 parents 8d0a25b + 545b6df commit c2a94b5
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 @@ -461,7 +461,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 c2a94b5

Please sign in to comment.