Changeset 578 for branches/samba-3.3.x/source/lib/util_sock.c
- Timestamp:
- Jun 25, 2011, 7:14:41 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/lib/util_sock.c
r206 r578 961 961 962 962 for (nread=0; nread < mincnt; ) { 963 if (fd < 0 || fd >= FD_SETSIZE) { 964 errno = EBADF; 965 return map_nt_error_from_unix(EBADF); 966 } 967 963 968 FD_ZERO(&fds); 964 969 FD_SET(fd,&fds); … … 1493 1498 for (i=0; i<num_addrs; i++) { 1494 1499 sockets[i] = socket(addrs[i].ss_family, SOCK_STREAM, 0); 1495 if (sockets[i] < 0 )1500 if (sockets[i] < 0 || sockets[i] >= FD_SETSIZE) 1496 1501 goto done; 1497 1502 set_blocking(sockets[i], false); … … 1542 1547 1543 1548 for (i=0; i<num_addrs; i++) { 1544 if (sockets[i] == -1) 1549 if (sockets[i] < 0 || sockets[i] >= FD_SETSIZE) { 1550 /* This cannot happen - ignore if so. */ 1545 1551 continue; 1552 } 1546 1553 FD_SET(sockets[i], &wr_fds); 1547 1554 FD_SET(sockets[i], &r_fds);
Note:
See TracChangeset
for help on using the changeset viewer.