Currently we miss to do so if the config file does not exist or
is empty. This triggers the following assertion if, in addition,
no non-option arguments given:
para_play: string.c:62: para_malloc: Assertion `size' failed.
This is because we try to allocate a zero sized buffer in main() due
to lls_num_inputs() returning 0. Fix this by changing the target of
the goto in handle_help_flags().
This bug was introduced during the conversion to lopsub.
if (ret == -ERRNO_TO_PARA_ERROR(ENOENT) && OPT_GIVEN(CONFIG_FILE))
goto free_cf;
ret = 0;
- goto free_cf;
+ goto check_arg_count;
}
ret = lls(lls_convert_config(map, sz, NULL, &cf_argv, &errctx));
para_munmap(map, sz);
lls_free_parse_result(play_lpr, cmd);
play_lpr = merged_lpr;
loglevel = OPT_UINT32_VAL(LOGLEVEL);
-
+check_arg_count:
ret = lls(lls_check_arg_count(play_lpr, 1, INT_MAX, &errctx));
if (ret < 0)
goto free_cf;