Merge pull request #917 from hardening/WaitForMultipleObjectsFix

WaitForMultipleObjects should conform to API and return WAIT_FAILED when nCount is 0
This commit is contained in:
Marc-André Moreau 2013-01-22 13:04:52 -08:00
commit c230726259

View File

@ -160,6 +160,8 @@ DWORD WaitForMultipleObjects(DWORD nCount, const HANDLE* lpHandles, BOOL bWaitAl
PVOID Object;
struct timeval timeout;
if (!nCount)
return WAIT_FAILED;
maxfd = 0;
FD_ZERO(&fds);
ZeroMemory(&timeout, sizeof(timeout));