summaryrefslogtreecommitdiff
path: root/src/socketengine_iocp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/socketengine_iocp.cpp')
-rw-r--r--src/socketengine_iocp.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/socketengine_iocp.cpp b/src/socketengine_iocp.cpp
index c5c589e5f..ab894299c 100644
--- a/src/socketengine_iocp.cpp
+++ b/src/socketengine_iocp.cpp
@@ -257,6 +257,9 @@ int IOCPEngine::DispatchEvents()
while (GetQueuedCompletionStatus(m_completionPort, &len, &intfd, &overlap, 1000))
{
+ if (intfd < 0 || intfd > MAX_DESCRIPTORS)
+ continue;
+
// woot, we got an event on a socket :P
eh = ref[intfd];
ov = CONTAINING_RECORD(overlap, Overlapped, m_overlap);