mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
fuzz: set errno from FuzzedSock::Wait() if it simulates a failure
This commit is contained in:
parent
5198a02de4
commit
0c90ff1429
1 changed files with 6 additions and 0 deletions
|
@ -9,7 +9,13 @@
|
|||
|
||||
bool FuzzedSock::Wait(std::chrono::milliseconds timeout, Event requested, Event* occurred) const
|
||||
{
|
||||
constexpr std::array wait_errnos{
|
||||
EBADF,
|
||||
EINTR,
|
||||
EINVAL,
|
||||
};
|
||||
if (!m_fuzzed_data_provider.ConsumeBool()) {
|
||||
SetFuzzedErrNo(m_fuzzed_data_provider, wait_errnos);
|
||||
return false;
|
||||
}
|
||||
if (occurred) *occurred = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue