Skip to content

Commit 545b6df

Browse files
committed
Fix a segfault when no arguments are provided
Signed-off-by: Luke Robison <lrbison@amazon.com>
1 parent 8d0a25b commit 545b6df

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)