Skip to content

Commit c9ad869

Browse files
out_azure_kusto: fixed size error
Signed-off-by: Tanmaya Panda <tanmayapanda@microsoft.com>
1 parent 27532d8 commit c9ad869

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

plugins/out_azure_kusto/azure_kusto_ingest.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,8 +547,10 @@ static flb_sds_t azure_kusto_create_blob_id(struct flb_azure_kusto *ctx, flb_sds
547547
size_t b64_len = 0;
548548
char *uuid = NULL;
549549
char timestamp[20]; /* Buffer for timestamp */
550-
char generated_random_string[ctx->blob_uri_length + 1];
550+
char *generated_random_string = NULL;
551551

552+
/* Allocate memory for the random string */
553+
generated_random_string = flb_malloc(ctx->blob_uri_length + 1);
552554
flb_time_get(&tm);
553555
ms = ((tm.tm.tv_sec * 1000) + (tm.tm.tv_nsec / 1000000));
554556

@@ -597,6 +599,7 @@ static flb_sds_t azure_kusto_create_blob_id(struct flb_azure_kusto *ctx, flb_sds
597599
flb_free(b64tag);
598600
}
599601
flb_free(uuid);
602+
flb_free(generated_random_string);
600603

601604
return blob_id;
602605
}

0 commit comments

Comments
 (0)