summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@sudo.ws>2023-04-16 16:06:59 -0600
committerTodd C. Miller <Todd.Miller@sudo.ws>2023-04-16 16:06:59 -0600
commit0cdb70bada6986acd2a6d92743c2aa4019d95d4e (patch)
tree97602527337ea4e76cc5197f2c44d178b6ffac10
parent7da96d52ace67b883e59fdefcec62fa8ed87a4aa (diff)
downloadsudo-0cdb70bada6986acd2a6d92743c2aa4019d95d4e.tar.gz
Get the tty size using stdout, not stderr, when printing help output.
While usage() prints to stderr, help() prints to stdout.
-rw-r--r--src/parse_args.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parse_args.c b/src/parse_args.c
index 303004b46..1214587b3 100644
--- a/src/parse_args.c
+++ b/src/parse_args.c
@@ -796,7 +796,7 @@ help(void)
int rows, cols;
debug_decl(help, SUDO_DEBUG_ARGS);
- sudo_get_ttysize(STDERR_FILENO, &rows, &cols);
+ sudo_get_ttysize(STDOUT_FILENO, &rows, &cols);
sudo_lbuf_init(&lbuf, usage_out, indent, NULL, cols);
if (strcmp(pname, "sudoedit") == 0) {
sudoedit = true;