aboutsummaryrefslogtreecommitdiff
path: root/console-tools/resize.c
diff options
context:
space:
mode:
Diffstat (limited to 'console-tools/resize.c')
-rw-r--r--console-tools/resize.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/console-tools/resize.c b/console-tools/resize.c
index 97866673a..8aa487c41 100644
--- a/console-tools/resize.c
+++ b/console-tools/resize.c
@@ -24,6 +24,7 @@
//config: COLUMNS=80;LINES=44;export COLUMNS LINES;
//applet:IF_RESIZE(APPLET_NOEXEC(resize, resize, BB_DIR_USR_BIN, BB_SUID_DROP, resize))
+/* bb_common_bufsiz1 usage here is safe wrt NOEXEC: not expecting it to be zeroed. */
//kbuild:lib-$(CONFIG_RESIZE) += resize.o
@@ -63,6 +64,7 @@ int resize_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
*/
tcgetattr(STDERR_FILENO, old_termios_p); /* fiddle echo */
+//TODO: die if the above fails?
memcpy(&new, old_termios_p, sizeof(new));
new.c_cflag |= (CLOCAL | CREAD);
new.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);