projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d15296
)
Make sure pixel sizes are zero when setting window size for ptys.
author
Noah Friedman
<friedman@splode.com>
Thu, 29 Oct 2020 21:55:37 +0000
(14:55 -0700)
committer
Noah Friedman
<friedman@splode.com>
Thu, 29 Oct 2020 21:55:37 +0000
(14:55 -0700)
* sysdep.c (set_window_size): Initialize data to zero to avoid
passing any garbage from the stack to ioctl.
src/sysdep.c
patch
|
blob
|
history
diff --git
a/src/sysdep.c
b/src/sysdep.c
index cb2f7f2f23c637f044d292b4d15a102d07906c6d..addaf4dc28a568d5db8a666ab5399a78f10b1a9a 100644
(file)
--- 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;