mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-22 01:08:56 +00:00
LibCore: Fix WSAEMSGSIZE error in pending_bytes with proper zero-init
In SocketWindows, the return value for the ioctl call was not initialized to zero. This was causing test_udp in TesDNSResolver to fail as UDPSocket::read_some() was incorrectly failing with WSAEMSGSIZE due the result of pending_bytes being some unspecified default value for an uninitialized unsigned long
This commit is contained in:
parent
4fa8238a46
commit
ff71efebb6
Notes:
github-actions[bot]
2025-08-24 00:37:27 +00:00
Author: https://github.com/ayeteadoe
Commit: ff71efebb6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5947
Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 1 additions and 1 deletions
|
@ -116,7 +116,7 @@ ErrorOr<size_t> PosixSocketHelper::pending_bytes() const
|
|||
return Error::from_windows_error(WSAENOTCONN);
|
||||
}
|
||||
|
||||
u_long value;
|
||||
u_long value = 0;
|
||||
TRY(System::ioctl(m_fd, FIONREAD, &value));
|
||||
return value;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue