Skip to content

Commit

Permalink
aws_util: use strncpy instead of strcpy
Browse files Browse the repository at this point in the history
Signed-off-by: Wesley Pettit <[email protected]>
  • Loading branch information
PettitWesley committed Mar 9, 2023
1 parent 09f19b2 commit efeffdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/aws/flb_aws_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit efeffdd

Please sign in to comment.