Fix execute's printing of the executed commands
If execute's argument was read interactively, it prints the argument
instead of the command. Else, it prints uninitialized garbage. The
latter can theoretically crash the server, or leak information.
Broken in commit 3de1e8be
, v4.3.28
This commit is contained in:
parent
68dc9b2936
commit
8b7c78b5fa
1 changed files with 2 additions and 2 deletions
|
@ -254,12 +254,12 @@ execute(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
pr("\nExecute : ");
|
pr("\nExecute : ");
|
||||||
uprnf(buf);
|
uprnf(player->combuf);
|
||||||
pr("\n");
|
pr("\n");
|
||||||
if (redir) {
|
if (redir) {
|
||||||
pr("Execute : redirection not supported\n");
|
pr("Execute : redirection not supported\n");
|
||||||
failed = 1;
|
failed = 1;
|
||||||
} else if (dispatch(buf, NULL) < 0)
|
} else if (dispatch(player->combuf, NULL) < 0)
|
||||||
failed = 1;
|
failed = 1;
|
||||||
empth_yield();
|
empth_yield();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue