From efeffdd450d0167c5dd9eb6747f8b31f8fed66ec Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Thu, 9 Mar 2023 14:25:28 -0800 Subject: [PATCH] aws_util: use strncpy instead of strcpy Signed-off-by: Wesley Pettit --- src/aws/flb_aws_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aws/flb_aws_util.c b/src/aws/flb_aws_util.c index b4a91aff8af..38fbd5f84df 100644 --- a/src/aws/flb_aws_util.c +++ b/src/aws/flb_aws_util.c @@ -700,7 +700,7 @@ static char* replace_uri_tokens(const char* original_string, const char* current i = 0; while (*original_string) { if (strstr(original_string, current_word) == original_string) { - strcpy(&result[i], new_word); + strncpy(&result[i], new_word, new_word_len); i += new_word_len; original_string += old_word_len; }