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.
This commit is contained in:
parent
2d15296db1
commit
da6234e2df
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue