From a91ad7f2ffac3f1cec0c6c42e780ab5efc92ba5c Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Fri, 24 Sep 2021 08:08:49 +0000 Subject: [PATCH] drop unnecessary bzero the whole struct client is already memset'd to 0 in do_accept. handle_handshake doesn't touch the request or iri buffer in the code path that leads to handle_open_conn. (It does so in the error router alone.) --- server.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/server.c b/server.c index 0ee2266..14991b8 100644 --- a/server.c +++ b/server.c @@ -650,9 +650,6 @@ handle_open_conn(int fd, short ev, void *d) const char *parse_err = "invalid request"; char decoded[DOMAIN_NAME_LEN]; - bzero(c->req, sizeof(c->req)); - bzero(&c->iri, sizeof(c->iri)); - switch (tls_read(c->ctx, c->req, sizeof(c->req)-1)) { case -1: log_err(c, "tls_read: %s", tls_error(c->ctx));