Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2025-08-22 10:01:08 +01:00
3 changed files with 8 additions and 5 deletions

View File

@ -3442,7 +3442,7 @@ server_client_dispatch_command(struct client *c, struct imsg *imsg)
struct msg_command data;
char *buf;
size_t len;
int argc;
int argc = 0;
char **argv, *cause;
struct cmd_parse_result *pr;
struct args_value *values;
@ -3461,12 +3461,12 @@ server_client_dispatch_command(struct client *c, struct imsg *imsg)
if (len > 0 && buf[len - 1] != '\0')
fatalx("bad MSG_COMMAND string");
argc = data.argc;
if (cmd_unpack_argv(buf, len, argc, &argv) != 0) {
if (cmd_unpack_argv(buf, len, data.argc, &argv) != 0) {
cause = xstrdup("command too long");
goto error;
}
argc = data.argc;
if (argc == 0) {
cmdlist = cmd_list_copy(options_get_command(global_options,
"default-client-command"), 0, NULL);