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/events.c

    r221 r578  
    141141        struct fd_event *fde;
    142142
     143        if (fd < 0 || fd >= FD_SETSIZE) {
     144                errno = EBADF;
     145                return NULL;
     146        }
     147
    143148        if (!(fde = TALLOC_P(mem_ctx, struct fd_event))) {
    144149                return NULL;
     
    191196
    192197        for (fde = event_ctx->fd_events; fde; fde = fde->next) {
     198                if (fde->fd < 0 || fde->fd >= FD_SETSIZE) {
     199                        /* We ignore here, as it shouldn't be
     200                           possible to add an invalid fde->fd
     201                           but we don't want FD_SET to see an
     202                           invalid fd. */
     203                        continue;
     204                }
     205
    193206                if (fde->flags & EVENT_FD_READ) {
    194207                        FD_SET(fde->fd, read_fds);
Note: See TracChangeset for help on using the changeset viewer.