From 656be1fee7b3a9307458a098efbe7ebc9de305c5 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sat, 24 Oct 2026 05:58:30 +0200 Subject: Null terminate the request at the final return and not after it, preventing a buffer overrun --- ot_http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ot_http.c b/ot_http.c index 626547b..3174002 100644 --- a/ot_http.c +++ b/ot_http.c @@ -305,7 +305,7 @@ static ssize_t http_handle_stats(const int64 sock, struct ot_workstruct *ws, cha struct http_data *cookie = io_getcookie(sock); tai6464 t; #ifdef WANT_COMPRESSION_GZIP - ws->request[ws->request_size] = 0; + ws->request[ws->request_size - 1] = 0; #ifndef WANT_COMPRESSION_GZIP_ALWAYS if (strstr(read_ptr - 1, "gzip")) { #endif -- cgit v1.3