From dfe4e16e138a48c8593c03a5db0b9a67a83ddeb4 Mon Sep 17 00:00:00 2001 From: Niels Provos Date: Tue, 26 Apr 2005 07:17:42 +0000 Subject: [PATCH] pointer arithmetic bug; from Nick Mathewson svn:r157 --- poll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.40.0