From: Niels Provos Date: Tue, 26 Apr 2005 07:17:42 +0000 (+0000) Subject: pointer arithmetic bug; from Nick Mathewson X-Git-Tag: release-1.1b~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dfe4e16e138a48c8593c03a5db0b9a67a83ddeb4;p=libevent pointer arithmetic bug; from Nick Mathewson svn:r157 --- diff --git a/poll.c b/poll.c index dcb9c6a3..19cd9dab 100644 --- a/poll.c +++ b/poll.c @@ -166,7 +166,7 @@ poll_dispatch(struct event_base *base, void *arg, struct timeval *tv) event_warn("realloc"); return (-1); } - memset(pop->idxplus1_by_fd+sizeof(int)*fd_count, + memset(pop->idxplus1_by_fd + fd_count, 0, sizeof(int)*(new_count-fd_count)); fd_count = pop->fd_count = new_count; }