#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)svc.c 1.44 88/02/08 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)svc.c 2.4 88/08/11 4.0 RPCSRC";*/
-static char *rcsid = "$Id: svc.c,v 1.2 1999/10/14 21:56:54 wsanchez Exp $";
+static char *rcsid = "$Id: svc.c,v 1.3 2001/08/23 01:25:01 ajn Exp $";
#endif
/*
maskp = (u_long *)readfds->fds_bits;
- for (sock = 0; sock < FD_SETSIZE; sock += NFDBITS) {
+ for (sock = 0; sock <= svc_maxfd; sock += NFDBITS) {
for (mask = *maskp++; bit = ffs(mask); mask ^= (1 << (bit - 1))) {
+ if ((sock + bit) > (svc_maxfd + 1))
+ /* if we're past our sockets */
+ return;
/* sock has input waiting */
xprt = xports[sock + bit - 1];
if (xprt == NULL)