Skip to content

Commit

Permalink
aws: util: initialize key buffer to zero
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Sep 30, 2020
1 parent f725749 commit 155fafe
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 @@ -835,7 +835,7 @@ flb_sds_t flb_get_s3_key(const char *format, time_t time, const char *tag, char
tmp = NULL;

/* A string no longer than S3_KEY_SIZE is created to store the formatted timestamp. */
key = flb_malloc(S3_KEY_SIZE * sizeof(char));
key = flb_calloc(1, S3_KEY_SIZE * sizeof(char));
if (!key) {
goto error;
}
Expand Down

0 comments on commit 155fafe

Please sign in to comment.