In article <[EMAIL PROTECTED]> you wrote:
> Here is a small bug (?) in pth. For example, suppose in a normal UNIX > environment you call the sendto() function with a file descriptor of -1. > The result is that -1 is returned with errno = EBADF (bad file descriptor). > > However, if you call pth_sendto() with fd equal to -1, you get a core > dump, because pth_sendto_ev() calls FD_SET(fd, &fds) without checking > that fd is valid. On FreeBSD at least, this sets a bit outside of the > "fds" memory space and corrupts the stack. > > Perhaps in pth_sendto_ev() (and others?) the fd should first be checked > to be between zero and FD_SETSIZE-1 before doing anything else with it. Now done in Pth 1.4.1. Thanks for your feedback. Ralf S. Engelschall [EMAIL PROTECTED] www.engelschall.com ______________________________________________________________________ GNU Portable Threads (Pth) http://www.gnu.org/software/pth/ User Support Mailing List [EMAIL PROTECTED] Automated List Manager (Majordomo) [EMAIL PROTECTED]