mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Merge a085a55491 into merged_master (Bitcoin PR bitcoin/bitcoin#25428)
This commit is contained in:
commit
94c443f2bf
7 changed files with 28 additions and 76 deletions
|
|
@ -24,10 +24,10 @@ FuzzedSock::FuzzedSock(FuzzedDataProvider& fuzzed_data_provider)
|
|||
FuzzedSock::~FuzzedSock()
|
||||
{
|
||||
// Sock::~Sock() will be called after FuzzedSock::~FuzzedSock() and it will call
|
||||
// Sock::Reset() (not FuzzedSock::Reset()!) which will call CloseSocket(m_socket).
|
||||
// close(m_socket) if m_socket is not INVALID_SOCKET.
|
||||
// Avoid closing an arbitrary file descriptor (m_socket is just a random very high number which
|
||||
// theoretically may concide with a real opened file descriptor).
|
||||
Reset();
|
||||
m_socket = INVALID_SOCKET;
|
||||
}
|
||||
|
||||
FuzzedSock& FuzzedSock::operator=(Sock&& other)
|
||||
|
|
@ -36,11 +36,6 @@ FuzzedSock& FuzzedSock::operator=(Sock&& other)
|
|||
return *this;
|
||||
}
|
||||
|
||||
void FuzzedSock::Reset()
|
||||
{
|
||||
m_socket = INVALID_SOCKET;
|
||||
}
|
||||
|
||||
ssize_t FuzzedSock::Send(const void* data, size_t len, int flags) const
|
||||
{
|
||||
constexpr std::array send_errnos{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue