On Tue, Apr 21, 2009 at 4:48 PM, Dave Shield <[email protected]> wrote: > 2009/4/21 Bart Van Assche <[email protected]>: >> <[email protected]> wrote: >>> OK - I've reverted that patch, and applied a simpler one to deal >>> with the immediate problem. (i.e. skip any fd's that are too large >>> to be handled by fd_set, etc). >> >> Can you please remove the ">= FD_SETSIZE" tests again ? These cause >> the Windows snmpd.exe to stop immediately (all socket handles on >> Windows have a numeric value >= 1024). > > Hmmm... > as far as I can tell, the new "large_fd_set" processing still has > no protection against the socket being tested being outside the > valid set.
I admit that I should have been more clear about the changes between the first and the second version of the patch that implements support for large file descriptors. One of the changes I implemented is that version two of the NETSNMP_LARGE_FD_SET(fd, fdset) macro now allocates more memory if necessary in order to add file descriptor 'fd' to the set 'fdset'. As long as all 'fd' values are return values of system calls instead of being provided by untrusted external software, this should work fine. Bart. ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
