From dee0c004e04ad962c4626a010c44b49bc3179624 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Wed, 29 Dec 2021 02:59:44 -0800 Subject: [PATCH] Kernel: Zero initialize `winsize` in TIOCGWINSZ It looks like type types are small enough that there is no padding. So there didn't happen to be an info leak here, but lets zero initialize just to be on the safe side, and make auditing easier. --- Kernel/TTY/TTY.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/TTY/TTY.cpp b/Kernel/TTY/TTY.cpp index 06dce47dc5..71b94188d6 100644 --- a/Kernel/TTY/TTY.cpp +++ b/Kernel/TTY/TTY.cpp @@ -543,7 +543,7 @@ ErrorOr TTY::ioctl(OpenFileDescription&, unsigned request, Userspace(arg); - winsize ws; + winsize ws {}; ws.ws_row = m_rows; ws.ws_col = m_columns; ws.ws_xpixel = 0;