From c9ad8697a0cdb32cbc32ed80ace87955999d1dd1 Mon Sep 17 00:00:00 2001 From: Tanmaya Panda Date: Mon, 13 Jan 2025 19:38:37 +0530 Subject: [PATCH] out_azure_kusto: fixed size error Signed-off-by: Tanmaya Panda --- plugins/out_azure_kusto/azure_kusto_ingest.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/out_azure_kusto/azure_kusto_ingest.c b/plugins/out_azure_kusto/azure_kusto_ingest.c index f81825b7a8d..9c1d73342f7 100644 --- a/plugins/out_azure_kusto/azure_kusto_ingest.c +++ b/plugins/out_azure_kusto/azure_kusto_ingest.c @@ -547,8 +547,10 @@ static flb_sds_t azure_kusto_create_blob_id(struct flb_azure_kusto *ctx, flb_sds size_t b64_len = 0; char *uuid = NULL; char timestamp[20]; /* Buffer for timestamp */ - char generated_random_string[ctx->blob_uri_length + 1]; + char *generated_random_string = NULL; + /* Allocate memory for the random string */ + generated_random_string = flb_malloc(ctx->blob_uri_length + 1); flb_time_get(&tm); ms = ((tm.tm.tv_sec * 1000) + (tm.tm.tv_nsec / 1000000)); @@ -597,6 +599,7 @@ static flb_sds_t azure_kusto_create_blob_id(struct flb_azure_kusto *ctx, flb_sds flb_free(b64tag); } flb_free(uuid); + flb_free(generated_random_string); return blob_id; }