From 3473638988bd75d9e1835869c92e34c0056fcaf9 Mon Sep 17 00:00:00 2001 From: Josh Baird Date: Tue, 11 Jul 2023 09:12:50 -0400 Subject: [PATCH] aws: imds: set length when initializing token to dummy value Signed-off-by: Josh Baird --- src/aws/flb_aws_imds.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/aws/flb_aws_imds.c b/src/aws/flb_aws_imds.c index 12277f3b487..0e54db161c1 100644 --- a/src/aws/flb_aws_imds.c +++ b/src/aws/flb_aws_imds.c @@ -70,6 +70,7 @@ struct flb_aws_imds *flb_aws_imds_create(const struct flb_aws_imds_config *imds_ */ ctx->imds_version = imds_config->use_imds_version; ctx->imds_v2_token = flb_sds_create_len("INVALID_TOKEN", 13); + ctx->imds_v2_token_len = 13; /* Detect IMDS support */ if (!ec2_imds_client->upstream) {