aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/Unix/Process.inc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/Unix/Process.inc')
-rw-r--r--lib/Support/Unix/Process.inc2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Support/Unix/Process.inc b/lib/Support/Unix/Process.inc
index 1335b78..9a4454f 100644
--- a/lib/Support/Unix/Process.inc
+++ b/lib/Support/Unix/Process.inc
@@ -224,6 +224,8 @@ static unsigned getColumns(int FileID) {
#if defined(HAVE_SYS_IOCTL_H) && defined(HAVE_TERMIOS_H)
// Try to determine the width of the terminal.
struct winsize ws;
+ // Zero-fill ws to avoid a false positive from MemorySanitizer.
+ memset(&ws, 0, sizeof(ws));
if (ioctl(FileID, TIOCGWINSZ, &ws) == 0)
Columns = ws.ws_col;
#endif