From 155fafec8e41d2da09f5633bccacbccc7075db4f Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Wed, 30 Sep 2020 06:56:56 -0600 Subject: [PATCH] aws: util: initialize key buffer to zero Signed-off-by: Eduardo Silva --- 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 91f156fb3f9..7b6aa9843cc 100644 --- a/src/aws/flb_aws_util.c +++ b/src/aws/flb_aws_util.c @@ -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; }