Ignore:
Timestamp:
Jun 25, 2011, 7:14:41 PM (14 years ago)
Author:
Herwig Bauernfeind
Message:

Update Samba 3.3 to 3.3.15 (security update)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/lib/util_sock.c

    r206 r578  
    961961
    962962        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
    963968                FD_ZERO(&fds);
    964969                FD_SET(fd,&fds);
     
    14931498        for (i=0; i<num_addrs; i++) {
    14941499                sockets[i] = socket(addrs[i].ss_family, SOCK_STREAM, 0);
    1495                 if (sockets[i] < 0)
     1500                if (sockets[i] < 0 || sockets[i] >= FD_SETSIZE)
    14961501                        goto done;
    14971502                set_blocking(sockets[i], false);
     
    15421547
    15431548        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. */
    15451551                        continue;
     1552                }
    15461553                FD_SET(sockets[i], &wr_fds);
    15471554                FD_SET(sockets[i], &r_fds);
Note: See TracChangeset for help on using the changeset viewer.