aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2018-06-28 19:30:04 +0200
committerToni Uhlig <matzeton@googlemail.com>2018-06-28 19:30:04 +0200
commit2711a7142d8a7cc12bbb26add3ba0ccae9e41b45 (patch)
treef121f01ec455c96be9ab5642ad86b96e53c062dc /src
parent5dfe99c885f26aca29db9d584ab55916da908535 (diff)
zero out mmap'd memory
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src')
-rw-r--r--src/redirector.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/redirector.c b/src/redirector.c
index 74f9be2..f26ce44 100644
--- a/src/redirector.c
+++ b/src/redirector.c
@@ -247,6 +247,7 @@ static int redirector_mainloop(event_ctx **ev_ctx, redirector_ctx *rdr_ctx[], si
ev_srv = (server_event *) mmap(NULL, sizeof *ev_srv, PROT_READ|PROT_WRITE,
MAP_SHARED|MAP_ANONYMOUS, -1, 0);
assert( ev_srv );
+ memset(ev_srv, 0, sizeof *ev_srv);
ev_srv->rdr_ctx = rdr_ctx;
ev_srv->siz = siz;
ev_srv->last_accept_stamp = time(NULL);