From 6d77e7114d13ebc54be7b911d565f81713592d05 Mon Sep 17 00:00:00 2001 From: Vaibhav-C-S Date: Sat, 27 Jun 2026 07:05:38 +0530 Subject: [PATCH] out_s3: require exact match for log_key Signed-off-by: Vaibhav-C-S --- plugins/out_s3/s3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/out_s3/s3.c b/plugins/out_s3/s3.c index ac70da12957..685e6137783 100644 --- a/plugins/out_s3/s3.c +++ b/plugins/out_s3/s3.c @@ -3621,7 +3621,8 @@ static flb_sds_t flb_pack_msgpack_extract_log_key(void *out_context, const char } if (check == FLB_TRUE) { - if (strncmp(ctx->log_key, key_str, key_str_size) == 0) { + if (strlen(ctx->log_key) == key_str_size && + strncmp(ctx->log_key, key_str, key_str_size) == 0) { found = FLB_TRUE; /*