Skip to content

Commit c2a94b5

Browse files
authored
Merge pull request #18 from lrbison/fix_no_args_segfault
Fix a segfault when no arguments are provided
2 parents 8d0a25b + 545b6df commit c2a94b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/prte/prte.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ int main(int argc, char *argv[])
461461
/* parse the input argv to get values, including everyone's MCA params */
462462
PMIX_CONSTRUCT(&results, pmix_cli_result_t);
463463
// check for special case of executable immediately following tool
464-
if (proxyrun && '-' != pargv[1][0]) {
464+
if (proxyrun && pargc > 1 && '-' != pargv[1][0]) {
465465
results.tail = PMIx_Argv_copy(&pargv[1]);
466466
} else {
467467
rc = schizo->parse_cli(pargv, &results, PMIX_CLI_WARN);

0 commit comments

Comments
 (0)