summaryrefslogtreecommitdiff
path: root/net-im/jabberd/files/jabberd-1.4.4-mio-bug-rev1291.patch
Side-by-side diff
Diffstat (limited to 'net-im/jabberd/files/jabberd-1.4.4-mio-bug-rev1291.patch') (more/less context) (ignore whitespace changes)
-rw-r--r--net-im/jabberd/files/jabberd-1.4.4-mio-bug-rev1291.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/net-im/jabberd/files/jabberd-1.4.4-mio-bug-rev1291.patch b/net-im/jabberd/files/jabberd-1.4.4-mio-bug-rev1291.patch
new file mode 100644
index 0000000..338369c
--- a/dev/null
+++ b/net-im/jabberd/files/jabberd-1.4.4-mio-bug-rev1291.patch
@@ -0,0 +1,16 @@
+--- jabberd/mio.c 2006/08/10 14:54:02 1290
++++ jabberd/mio.c 2006/09/02 05:35:46 1291
+@@ -469,6 +469,13 @@
+ return NULL;
+ }
+
++ /* do not accept a higher fd than FD_SET, or FD_CLR can handle */
++ if (fd >= FD_SETSIZE) {
++ log_warn(NULL, "could not accept incoming connection, maximum number of connections reached (%i)", FD_SETSIZE);
++ close(fd);
++ return NULL;
++ }
++
+ log_debug2(ZONE, LOGT_IO, "_mio_accept(%X) accepted fd #%d", m, fd);
+
+ /* access and rate checks */