Changeset 2554


Ignore:
Timestamp:
Mar 26, 2009 11:16:06 AM (16 years ago)
Author:
bennylp
Message:

Ticket #769: Bug in select ioqueue: event counter may exceed maximum value, causing stack corruption (thanks Joel Dodson for the report)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/ioqueue_select.c

    r2394 r2554  
    728728        /* Scan for readable socket. */ 
    729729        if ((key_has_pending_read(h) || key_has_pending_accept(h)) 
    730             && PJ_FD_ISSET(h->fd, &rfdset) && !IS_CLOSING(h)) 
     730            && PJ_FD_ISSET(h->fd, &rfdset) && !IS_CLOSING(h) && 
     731            counter<count) 
    731732        { 
    732733#if PJ_IOQUEUE_HAS_SAFE_UNREG 
     
    740741#if PJ_HAS_TCP 
    741742        if (key_has_pending_connect(h) && PJ_FD_ISSET(h->fd, &xfdset) && 
    742             !IS_CLOSING(h))  
     743            !IS_CLOSING(h) && counter<count)  
    743744        { 
    744745#if PJ_IOQUEUE_HAS_SAFE_UNREG 
Note: See TracChangeset for help on using the changeset viewer.