From b48785bbe2713bcbefdf1a97c5a3f17288074404 Mon Sep 17 00:00:00 2001 From: Leonardo Alminana Date: Mon, 18 Nov 2024 14:54:25 +0100 Subject: [PATCH] http_client: fixed potential memory corruption Signed-off-by: Leonardo Alminana --- src/flb_http_client_http1.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/flb_http_client_http1.c b/src/flb_http_client_http1.c index e09950c70fb..1c1fa235ad5 100644 --- a/src/flb_http_client_http1.c +++ b/src/flb_http_client_http1.c @@ -479,6 +479,8 @@ int flb_http1_request_commit(struct flb_http_request *request) return -7; } + request_buffer = sds_result; + if (request->body != NULL) { sds_result = cfl_sds_cat(request_buffer, request->body,