diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-12-29 02:59:44 -0800 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-12-29 03:41:32 -0800 |
commit | dee0c004e04ad962c4626a010c44b49bc3179624 (patch) | |
tree | b9fd9a25a5cdd685ce624f54d467a14cf8de9bdf /Kernel/TTY | |
parent | 737a11389ccd741b581f35ff79e3ec159eb09764 (diff) | |
download | serenity-dee0c004e04ad962c4626a010c44b49bc3179624.zip |
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.
Diffstat (limited to 'Kernel/TTY')
-rw-r--r-- | Kernel/TTY/TTY.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<void> TTY::ioctl(OpenFileDescription&, unsigned request, Userspace<void* } case TIOCGWINSZ: { auto user_winsize = static_ptr_cast<winsize*>(arg); - winsize ws; + winsize ws {}; ws.ws_row = m_rows; ws.ws_col = m_columns; ws.ws_xpixel = 0; |