summaryrefslogtreecommitdiff
path: root/src/userprocess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/userprocess.cpp')
-rw-r--r--src/userprocess.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/userprocess.cpp b/src/userprocess.cpp
index 00b086893..01462d47c 100644
--- a/src/userprocess.cpp
+++ b/src/userprocess.cpp
@@ -317,7 +317,7 @@ void DoSocketTimeouts(time_t TIME)
for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++)
{
InspSocket* s = (InspSocket*)*a;
- if ((s) && (socket_ref[s->GetFd()] != NULL) && (s->Timeout(TIME)))
+ if ((s) && (s->GetFd() >= 0) && (s->GetFd() < MAX_DESCRIPTORS) && (socket_ref[s->GetFd()] != NULL) && (s->Timeout(TIME)))
{
log(DEBUG,"userprocess.cpp: Socket poll returned false, close and bail");
socket_ref[s->GetFd()] = NULL;