emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-27 da6234e: Make sure pixel sizes are zero when setting window siz


From: Noah Friedman
Subject: emacs-27 da6234e: Make sure pixel sizes are zero when setting window size for ptys.
Date: Thu, 29 Oct 2020 17:55:50 -0400 (EDT)

branch: emacs-27
commit da6234e2dfd8c345bad1ff3075033b282b64f958
Author: Noah Friedman <friedman@splode.com>
Commit: Noah Friedman <friedman@splode.com>

    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.
---
 src/sysdep.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/sysdep.c b/src/sysdep.c
index cb2f7f2..addaf4d 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;
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]