]> granicus.if.org Git - libevent/commitdiff
pointer arithmetic bug; from Nick Mathewson
authorNiels Provos <provos@gmail.com>
Tue, 26 Apr 2005 07:17:42 +0000 (07:17 +0000)
committerNiels Provos <provos@gmail.com>
Tue, 26 Apr 2005 07:17:42 +0000 (07:17 +0000)
svn:r157

poll.c

diff --git a/poll.c b/poll.c
index dcb9c6a3139dee8bc1b7ae7ce243e94b97dbf0de..19cd9dab035bdeebe9542f0aec8145d95cf6b02b 100644 (file)
--- 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;
                }