From: Markus Armbruster Date: Thu, 15 Mar 2012 20:38:29 +0000 (+0100) Subject: Fix execute's printing of the executed commands X-Git-Tag: v4.3.30~43 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=8b7c78b5fa46de70eefc0ac54feee436d381917d 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 --- diff --git a/src/lib/player/player.c b/src/lib/player/player.c index 35b1ca091..2a489392d 100644 --- a/src/lib/player/player.c +++ b/src/lib/player/player.c @@ -254,12 +254,12 @@ execute(void) continue; } pr("\nExecute : "); - uprnf(buf); + uprnf(player->combuf); pr("\n"); if (redir) { pr("Execute : redirection not supported\n"); failed = 1; - } else if (dispatch(buf, NULL) < 0) + } else if (dispatch(player->combuf, NULL) < 0) failed = 1; empth_yield(); }