fuzz: set errno from FuzzedSock::Wait() if it simulates a failure

pull/826/head
Vasil Dimov 4 years ago
parent 5198a02de4
commit 0c90ff1429
No known key found for this signature in database
GPG Key ID: 54DF06F64B55CBBF

@ -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…
Cancel
Save