Skip to content

Commit 6d77e71

Browse files
committed
out_s3: require exact match for log_key
Signed-off-by: Vaibhav-C-S <vaibhavsharma.c@gmail.com>
1 parent f317143 commit 6d77e71

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

plugins/out_s3/s3.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3621,7 +3621,8 @@ static flb_sds_t flb_pack_msgpack_extract_log_key(void *out_context, const char
36213621
}
36223622

36233623
if (check == FLB_TRUE) {
3624-
if (strncmp(ctx->log_key, key_str, key_str_size) == 0) {
3624+
if (strlen(ctx->log_key) == key_str_size &&
3625+
strncmp(ctx->log_key, key_str, key_str_size) == 0) {
36253626
found = FLB_TRUE;
36263627

36273628
/*

0 commit comments

Comments
 (0)