summaryrefslogtreecommitdiff
path: root/src/sysdep.c
diff options
context:
space:
mode:
authorNoah Friedman <friedman@splode.com>2020-10-29 14:55:37 -0700
committerNoah Friedman <friedman@splode.com>2020-10-29 14:55:37 -0700
commitda6234e2dfd8c345bad1ff3075033b282b64f958 (patch)
tree28b059b7c089be59e626f1ca3854566fbe8c1cea /src/sysdep.c
parent2d15296db112740bcb6e7fa5808b57f12a99e49e (diff)
downloademacs-da6234e2dfd8c345bad1ff3075033b282b64f958.tar.gz
Make sure pixel sizes are zero when setting window size for ptys.
* sysdep.c (set_window_size): Initialize data to zero to avoid passing any garbage from the stack to ioctl.
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index cb2f7f2f23c..addaf4dc28a 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -1447,6 +1447,7 @@ set_window_size (int fd, int height, int width)
/* BSD-style. */
struct winsize size;
+ memset (&size, 0, sizeof (size));
size.ws_row = height;
size.ws_col = width;
@@ -1457,6 +1458,7 @@ set_window_size (int fd, int height, int width)
/* SunOS - style. */
struct ttysize size;
+ memset (&size, 0, sizeof (size));
size.ts_lines = height;
size.ts_cols = width;