From 99f8ae0d0d16cdd9759304143e013602aaae1d3d Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Sun, 24 Feb 2019 17:55:06 -0500 Subject: [PATCH] [mod_openssl] use 16k static buffer instead of 64k better match size used by openssl (avoid unused, oversized reads) --- src/mod_openssl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod_openssl.c b/src/mod_openssl.c index 18a748eb..33815b57 100644 --- a/src/mod_openssl.c +++ b/src/mod_openssl.c @@ -82,7 +82,7 @@ static int ssl_is_init; /* need assigned p->id for deep access of module handler_ctx for connection * i.e. handler_ctx *hctx = con->plugin_ctx[plugin_data_singleton->id]; */ static plugin_data *plugin_data_singleton; -#define LOCAL_SEND_BUFSIZE (64 * 1024) +#define LOCAL_SEND_BUFSIZE (16 * 1024) static char *local_send_buffer; typedef struct { @@ -1435,7 +1435,7 @@ load_next_chunk (server *srv, chunkqueue *cq, off_t max_bytes, { chunk *c = cq->first; - /* local_send_buffer is a 64k sendbuffer (LOCAL_SEND_BUFSIZE) + /* local_send_buffer is a static buffer of size (LOCAL_SEND_BUFSIZE) * * it has to stay at the same location all the time to satisfy the needs * of SSL_write to pass the SAME parameter in case of a _WANT_WRITE -- 2.11.4.GIT