mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 02:08:12 +03:00
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.
This commit is contained in:
parent
737a11389c
commit
dee0c004e0
Notes:
sideshowbarker
2024-07-17 22:00:18 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/dee0c004e04 Pull-request: https://github.com/SerenityOS/serenity/pull/11477 Reviewed-by: https://github.com/awesomekling ✅
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user