]> git.sur5r.net Git - openldap/blobdiff - servers/slurpd/detach.c
Changed FD_SETSIZE checks for consistency. Added checks where needed.
[openldap] / servers / slurpd / detach.c
index 7b3fdab57ae97fc181fae0452a6ee4c3cd04b1de..4b771223479f2384eb4e0c8cc5a24798cdfea6f4 100644 (file)
@@ -39,6 +39,12 @@ detach()
        nbits = getdtablesize();
 #endif /* USE_SYSCONF */
 
+#ifdef FD_SETSIZE
+       if ( nbits > FD_SETSIZE ) {
+               nbits = FD_SETSIZE;
+       }
+#endif /* FD_SETSIZE */
+
 #ifdef LDAP_DEBUG
        if ( ldap_debug == 0 ) {
 #endif