From: Niels Provos Date: Thu, 8 Dec 2005 23:05:42 +0000 (+0000) Subject: windows memory corruption bug fix from I-M Weasel via Nick Mathewson. X-Git-Tag: release-2.0.1-alpha~758 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c48c70680727ea0d6aed694b271d40019f2aa15;p=libevent windows memory corruption bug fix from I-M Weasel via Nick Mathewson. svn:r189 --- diff --git a/WIN32-Code/win32.c b/WIN32-Code/win32.c index f4cc2d8a..90a663a5 100644 --- a/WIN32-Code/win32.c +++ b/WIN32-Code/win32.c @@ -135,6 +135,8 @@ do_fd_set(struct win32op *op, SOCKET s, int read) if (set->fd_count == op->fd_setsz) { if (realloc_fd_sets(op, op->fd_setsz*2)) return (-1); + /* set pointer will have changed and needs reiniting! */ + set = read ? op->readset_in : op->writeset_in; } set->fd_array[set->fd_count] = s; return (set->fd_count++);